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

Diff for /src/usr.bin/tmux/window.c between version 1.257 and 1.258

version 1.257, 2020/04/13 20:51:57 version 1.258, 2020/05/16 14:53:23
Line 488 
Line 488 
 void  void
 window_redraw_active_switch(struct window *w, struct window_pane *wp)  window_redraw_active_switch(struct window *w, struct window_pane *wp)
 {  {
         struct style    *sy1, *sy2;          struct grid_cell        *gc1, *gc2;
         int              c1, c2;          int                      c1, c2;
   
         if (wp == w->active)          if (wp == w->active)
                 return;                  return;
Line 499 
Line 499 
                  * If the active and inactive styles or palettes are different,                   * If the active and inactive styles or palettes are different,
                  * need to redraw the panes.                   * need to redraw the panes.
                  */                   */
                 sy1 = &wp->cached_style;                  gc1 = &wp->cached_gc;
                 sy2 = &wp->cached_active_style;                  gc2 = &wp->cached_active_gc;
                 if (!style_equal(sy1, sy2))                  if (!grid_cells_look_equal(gc1, gc2))
                         wp->flags |= PANE_REDRAW;                          wp->flags |= PANE_REDRAW;
                 else {                  else {
                         c1 = window_pane_get_palette(wp, sy1->gc.fg);                          c1 = window_pane_get_palette(wp, gc1->fg);
                         c2 = window_pane_get_palette(wp, sy2->gc.fg);                          c2 = window_pane_get_palette(wp, gc2->fg);
                         if (c1 != c2)                          if (c1 != c2)
                                 wp->flags |= PANE_REDRAW;                                  wp->flags |= PANE_REDRAW;
                         else {                          else {
                                 c1 = window_pane_get_palette(wp, sy1->gc.bg);                                  c1 = window_pane_get_palette(wp, gc1->bg);
                                 c2 = window_pane_get_palette(wp, sy2->gc.bg);                                  c2 = window_pane_get_palette(wp, gc2->bg);
                                 if (c1 != c2)                                  if (c1 != c2)
                                         wp->flags |= PANE_REDRAW;                                          wp->flags |= PANE_REDRAW;
                         }                          }

Legend:
Removed from v.1.257  
changed lines
  Added in v.1.258