[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.78 and 1.79

version 1.78, 2009/12/04 11:01:29 version 1.79, 2009/12/14 21:33:38
Line 1231 
Line 1231 
         if (fg == tc->fg && bg == tc->bg &&          if (fg == tc->fg && bg == tc->bg &&
             ((flags ^ tc->flags) & (GRID_FLAG_FG256|GRID_FLAG_BG256)) == 0)              ((flags ^ tc->flags) & (GRID_FLAG_FG256|GRID_FLAG_BG256)) == 0)
                 return;                  return;
           log_debug("fg was %hhu, now %hhu", tc->fg, fg);
   
         /*          /*
          * Is either the default colour? This is handled specially because the           * Is either the default colour? This is handled specially because the
Line 1292 
Line 1293 
 {  {
         struct grid_cell        *tc = &tty->cell;          struct grid_cell        *tc = &tty->cell;
         u_char                   fg = gc->fg;          u_char                   fg = gc->fg;
           char                     s[32];
   
         /* Is this a 256-colour colour? */          /* Is this a 256-colour colour? */
         if (gc->flags & GRID_FLAG_FG256) {          if (gc->flags & GRID_FLAG_FG256) {
Line 1310 
Line 1312 
                         tty_reset(tty);         /* turn off bold */                          tty_reset(tty);         /* turn off bold */
         }          }
   
           /* Is this an aixterm bright colour? */
           if (fg >= 90 && fg <= 97) {
                   /* 16 colour terminals or above only. */
                   if (tty_term_number(tty->term, TTYC_COLORS) >= 16) {
                           xsnprintf(s, sizeof s, "\033[%dm", fg);
                           tty_puts(tty, s);
                           goto save_fg;
                   }
                   fg -= 90;
                   (*attr) |= GRID_ATTR_BRIGHT;
           }
   
         /* Otherwise set the foreground colour. */          /* Otherwise set the foreground colour. */
         tty_putcode1(tty, TTYC_SETAF, fg);          tty_putcode1(tty, TTYC_SETAF, fg);
   
Line 1325 
Line 1339 
 {  {
         struct grid_cell        *tc = &tty->cell;          struct grid_cell        *tc = &tty->cell;
         u_char                   bg = gc->bg;          u_char                   bg = gc->bg;
           char                     s[32];
   
         /* Is this a 256-colour colour? */          /* Is this a 256-colour colour? */
         if (gc->flags & GRID_FLAG_BG256) {          if (gc->flags & GRID_FLAG_BG256) {
Line 1341 
Line 1356 
                 bg = colour_256to16(bg);                  bg = colour_256to16(bg);
                 if (bg & 8)                  if (bg & 8)
                         bg &= 7;                          bg &= 7;
           }
   
           /* Is this an aixterm bright colour? */
           if (bg >= 100 && bg <= 107) {
                   /* 16 colour terminals or above only. */
                   if (tty_term_number(tty->term, TTYC_COLORS) >= 16) {
                           xsnprintf(s, sizeof s, "\033[%dm", bg);
                           tty_puts(tty, s);
                           goto save_bg;
                   }
                   bg -= 100;
                   /* no such thing as a bold background */
         }          }
   
         /* Otherwise set the background colour. */          /* Otherwise set the background colour. */

Legend:
Removed from v.1.78  
changed lines
  Added in v.1.79