[BACK]Return to tty.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/tty.c between version 1.58 and 1.59

version 1.58, 2009/10/21 19:27:09 version 1.59, 2009/10/25 21:11:21
Line 1236 
Line 1236 
                         tty_reset(tty);                          tty_reset(tty);
         }          }
   
         if (fg == 8 &&          if (fg == 8) {
             !(tty->term->flags & TERM_HASDEFAULTS) &&                  if (tty_term_has(tty->term, TTYC_AX)) {
             !(tty->term_flags & TERM_HASDEFAULTS))                          /* AX is an extension that means \033[39m works. */
                 fg = 7;                          tty_puts(tty, "\033[39m");
         if (fg == 8)                  } else if (tty_term_has(tty->term, TTYC_OP)) {
                 tty_puts(tty, "\033[39m");                          /*
         else                           * op can be used to look for default colours but there
                            * is no point in using it - with some terminals it
                            * does SGR0 and others not, so SGR0 is needed anyway
                            * to put the terminal into a known state.
                            */
                           tty_reset(tty);
                   } else
                           tty_putcode1(tty, TTYC_SETAF, 7);
           } else
                 tty_putcode1(tty, TTYC_SETAF, fg);                  tty_putcode1(tty, TTYC_SETAF, fg);
 }  }
   
Line 1262 
Line 1270 
                         bg &= 7;                          bg &= 7;
         }          }
   
         if (bg == 8 &&          if (bg == 8) {
             !(tty->term->flags & TERM_HASDEFAULTS) &&                  if (tty_term_has(tty->term, TTYC_AX)) {
             !(tty->term_flags & TERM_HASDEFAULTS))                          tty_puts(tty, "\033[49m");
                 bg = 0;                  } else if (tty_term_has(tty->term, TTYC_OP))
         if (bg == 8)                          tty_reset(tty);
                 tty_puts(tty, "\033[49m");                  else
         else                          tty_putcode1(tty, TTYC_SETAB, 0);
           } else
                 tty_putcode1(tty, TTYC_SETAB, bg);                  tty_putcode1(tty, TTYC_SETAB, bg);
 }  }

Legend:
Removed from v.1.58  
changed lines
  Added in v.1.59