[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.62 and 1.63

version 1.62, 2009/10/28 08:33:20 version 1.63, 2009/10/28 08:52:36
Line 1119 
Line 1119 
 void  void
 tty_attributes(struct tty *tty, const struct grid_cell *gc)  tty_attributes(struct tty *tty, const struct grid_cell *gc)
 {  {
         struct grid_cell        *tc = &tty->cell;          struct grid_cell        *tc = &tty->cell, gc2;
         u_char                   changed;          u_char                   changed;
         u_int                    fg = gc->fg, bg = gc->bg, attr = gc->attr;          u_int                    fg = gc->fg, bg = gc->bg, attr = gc->attr;
   
           /* If the character is space, don't care about foreground. */
           if (gc->data == ' ' && !(gc->flags & GRID_FLAG_UTF8)) {
                   memcpy(&gc2, gc, sizeof gc2);
   
                   if (gc->attr & GRID_ATTR_REVERSE)
                           gc2.bg = tc->bg;
                   else
                           gc2.fg = tc->fg;
                   gc2.attr = tc->attr & ~GRID_ATTR_REVERSE;
                   gc2.attr |= gc->attr & GRID_ATTR_REVERSE;
   
                   gc = &gc2;
           }
   
         /* If any bits are being cleared, reset everything. */          /* If any bits are being cleared, reset everything. */
         if (tc->attr & ~attr)          if (tc->attr & ~attr)
                 tty_reset(tty);                  tty_reset(tty);
Line 1185 
Line 1199 
         /* No changes? Nothing is necessary. */          /* No changes? Nothing is necessary. */
         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;
   
         /*          /*
          * Is either the default colour? This is handled specially because the           * Is either the default colour? This is handled specially because the

Legend:
Removed from v.1.62  
changed lines
  Added in v.1.63