[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.325 and 1.326

version 1.325, 2019/05/30 07:42:41 version 1.326, 2019/06/20 11:59:59
Line 2132 
Line 2132 
         /* Ignore cell if it is the same as the last one. */          /* Ignore cell if it is the same as the last one. */
         if (wp != NULL &&          if (wp != NULL &&
             (int)wp->id == tty->last_wp &&              (int)wp->id == tty->last_wp &&
             ~(wp->window->flags & WINDOW_STYLECHANGED) &&              ~(wp->flags & PANE_STYLECHANGED) &&
             gc->attr == tty->last_cell.attr &&              gc->attr == tty->last_cell.attr &&
             gc->fg == tty->last_cell.fg &&              gc->fg == tty->last_cell.fg &&
             gc->bg == tty->last_cell.bg)              gc->bg == tty->last_cell.bg)
Line 2514 
Line 2514 
 static void  static void
 tty_default_colours(struct grid_cell *gc, struct window_pane *wp)  tty_default_colours(struct grid_cell *gc, struct window_pane *wp)
 {  {
         struct window           *w = wp->window;          struct options  *oo = wp->options;
         struct options          *oo = w->options;          struct style    *style, *active_style;
         struct style            *active, *pane, *window;          int              c;
         int                      c;  
   
         if (w->flags & WINDOW_STYLECHANGED) {          if (wp->flags & PANE_STYLECHANGED) {
                 w->flags &= ~WINDOW_STYLECHANGED;                  wp->flags &= ~PANE_STYLECHANGED;
                 active = options_get_style(oo, "window-active-style");  
                 style_copy(&w->active_style, active);                  active_style = options_get_style(oo, "window-active-style");
                 window = options_get_style(oo, "window-style");                  style = options_get_style(oo, "window-style");
                 style_copy(&w->style, window);  
                   style_copy(&wp->cached_active_style, active_style);
                   style_copy(&wp->cached_style, style);
         } else {          } else {
                 active = &w->active_style;                  active_style = &wp->cached_active_style;
                 window = &w->style;                  style = &wp->cached_style;
         }          }
         pane = &wp->style;  
   
         if (gc->fg == 8) {          if (gc->fg == 8) {
                 if (pane->gc.fg != 8)                  if (wp == wp->window->active && active_style->gc.fg != 8)
                         gc->fg = pane->gc.fg;                          gc->fg = active_style->gc.fg;
                 else if (wp == w->active && active->gc.fg != 8)  
                         gc->fg = active->gc.fg;  
                 else                  else
                         gc->fg = window->gc.fg;                          gc->fg = style->gc.fg;
   
                 if (gc->fg != 8) {                  if (gc->fg != 8) {
                         c = window_pane_get_palette(wp, gc->fg);                          c = window_pane_get_palette(wp, gc->fg);
Line 2547 
Line 2545 
         }          }
   
         if (gc->bg == 8) {          if (gc->bg == 8) {
                 if (pane->gc.bg != 8)                  if (wp == wp->window->active && active_style->gc.bg != 8)
                         gc->bg = pane->gc.bg;                          gc->bg = active_style->gc.bg;
                 else if (wp == w->active && active->gc.bg != 8)  
                         gc->bg = active->gc.bg;  
                 else                  else
                         gc->bg = window->gc.bg;                          gc->bg = style->gc.bg;
   
                 if (gc->bg != 8) {                  if (gc->bg != 8) {
                         c = window_pane_get_palette(wp, gc->bg);                          c = window_pane_get_palette(wp, gc->bg);

Legend:
Removed from v.1.325  
changed lines
  Added in v.1.326