[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.223 and 1.224

version 1.223, 2017/01/12 00:19:32 version 1.224, 2017/01/12 00:30:41
Line 1625 
Line 1625 
                 } else                  } else
                         return;                          return;
         }          }
         colours = tty_term_number(tty->term, TTYC_COLORS);  
   
           /* How many colours does this terminal have? */
           if ((tty->term->flags|tty->term_flags) & TERM_256COLOURS)
                   colours = 256;
           else
                   colours = tty_term_number(tty->term, TTYC_COLORS);
   
         /* Is this a 256-colour colour? */          /* Is this a 256-colour colour? */
         if (gc->fg & COLOUR_FLAG_256) {          if (gc->fg & COLOUR_FLAG_256) {
                 /* And not a 256 colour mode? */                  /* And not a 256 colour mode? */
                 if (!(tty->term->flags & TERM_256COLOURS) &&                  if (colours != 256) {
                     !(tty->term_flags & TERM_256COLOURS)) {  
                         gc->fg = colour_256to16(gc->fg);                          gc->fg = colour_256to16(gc->fg);
                         if (gc->fg & 8) {                          if (gc->fg & 8) {
                                 gc->fg &= 7;                                  gc->fg &= 7;
Line 1674 
Line 1678 
                 } else                  } else
                         return;                          return;
         }          }
         colours = tty_term_number(tty->term, TTYC_COLORS);  
   
           /* How many colours does this terminal have? */
           if ((tty->term->flags|tty->term_flags) & TERM_256COLOURS)
                   colours = 256;
           else
                   colours = tty_term_number(tty->term, TTYC_COLORS);
   
         /* Is this a 256-colour colour? */          /* Is this a 256-colour colour? */
         if (gc->bg & COLOUR_FLAG_256) {          if (gc->bg & COLOUR_FLAG_256) {
                 /*                  /*
Line 1683 
Line 1692 
                  * palette. Bold background doesn't exist portably, so just                   * palette. Bold background doesn't exist portably, so just
                  * discard the bold bit if set.                   * discard the bold bit if set.
                  */                   */
                 if (!(tty->term->flags & TERM_256COLOURS) &&                  if (colours != 256) {
                     !(tty->term_flags & TERM_256COLOURS)) {  
                         gc->bg = colour_256to16(gc->bg);                          gc->bg = colour_256to16(gc->bg);
                         if (gc->bg & 8) {                          if (gc->bg & 8) {
                                 gc->bg &= 7;                                  gc->bg &= 7;

Legend:
Removed from v.1.223  
changed lines
  Added in v.1.224