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

Diff for /src/usr.bin/tmux/screen-write.c between version 1.152 and 1.153

version 1.152, 2019/05/10 14:12:47 version 1.153, 2019/05/28 09:50:54
Line 410 
Line 410 
         struct screen           *s = ctx->s;          struct screen           *s = ctx->s;
         struct grid_cell         gc;          struct grid_cell         gc;
         u_int                    cx, cy, i, j;          u_int                    cx, cy, i, j;
           const char              *name;
   
         cx = s->cx;          cx = s->cx;
         cy = s->cy;          cy = s->cy;
Line 421 
Line 422 
         format_draw(ctx, &gc, menu->width, menu->title, NULL);          format_draw(ctx, &gc, menu->width, menu->title, NULL);
   
         for (i = 0; i < menu->count; i++) {          for (i = 0; i < menu->count; i++) {
                 if (menu->items[i].name == NULL) {                  name = menu->items[i].name;
                   if (name == NULL) {
                         screen_write_cursormove(ctx, cx, cy + 1 + i, 0);                          screen_write_cursormove(ctx, cx, cy + 1 + i, 0);
                         screen_write_hline(ctx, menu->width + 4, 1, 1);                          screen_write_hline(ctx, menu->width + 4, 1, 1);
                 } else {                  } else {
                         if (choice >= 0 && i == (u_int)choice)                          if (choice >= 0 && i == (u_int)choice && *name != '-')
                                 gc.attr |= GRID_ATTR_REVERSE;                                  gc.attr |= GRID_ATTR_REVERSE;
                         screen_write_cursormove(ctx, cx + 2, cy + 1 + i, 0);                          screen_write_cursormove(ctx, cx + 2, cy + 1 + i, 0);
                         for (j = 0; j < menu->width; j++)                          for (j = 0; j < menu->width; j++)
                                 screen_write_putc(ctx, &gc, ' ');                                  screen_write_putc(ctx, &gc, ' ');
                         screen_write_cursormove(ctx, cx + 2, cy + 1 + i, 0);                          screen_write_cursormove(ctx, cx + 2, cy + 1 + i, 0);
                         format_draw(ctx, &gc, menu->width, menu->items[i].name,                          if (*name == '-') {
                             NULL);                                  name++;
                                   gc.attr |= GRID_ATTR_DIM;
                                   format_draw(ctx, &gc, menu->width, name, NULL);
                                   gc.attr &= ~GRID_ATTR_DIM;
                           } else
                                   format_draw(ctx, &gc, menu->width, name, NULL);
                         if (choice >= 0 && i == (u_int)choice)                          if (choice >= 0 && i == (u_int)choice)
                                 gc.attr &= ~GRID_ATTR_REVERSE;                                  gc.attr &= ~GRID_ATTR_REVERSE;
                 }                  }

Legend:
Removed from v.1.152  
changed lines
  Added in v.1.153