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

Diff for /src/usr.bin/tmux/popup.c between version 1.41 and 1.42

version 1.41, 2021/10/25 09:22:17 version 1.42, 2021/10/25 09:38:36
Line 237 
Line 237 
         screen_write_stop(&ctx);          screen_write_stop(&ctx);
   
         memcpy(&defaults, &pd->defaults, sizeof defaults);          memcpy(&defaults, &pd->defaults, sizeof defaults);
         if (COLOUR_DEFAULT(defaults.fg))          if (defaults.fg == 8)
                 defaults.fg = palette->fg;                  defaults.fg = palette->fg;
         if (COLOUR_DEFAULT(defaults.bg))          if (defaults.bg == 8)
                 defaults.bg = palette->bg;                  defaults.bg = palette->bg;
   
         if (pd->md != NULL) {          if (pd->md != NULL) {
Line 636 
Line 636 
 popup_display(int flags, enum box_lines lines, struct cmdq_item *item, u_int px,  popup_display(int flags, enum box_lines lines, struct cmdq_item *item, u_int px,
     u_int py, u_int sx, u_int sy, struct environ *env, const char *shellcmd,      u_int py, u_int sx, u_int sy, struct environ *env, const char *shellcmd,
     int argc, char **argv, const char *cwd, const char *title, struct client *c,      int argc, char **argv, const char *cwd, const char *title, struct client *c,
     struct session *s, popup_close_cb cb, void *arg)      struct session *s, const char* style, const char* border_style,
       popup_close_cb cb, void *arg)
 {  {
         struct popup_data       *pd;          struct popup_data       *pd;
         u_int                    jx, jy;          u_int                    jx, jy;
         struct options          *o;          struct options          *o;
           struct style             sytmp;
   
         if (s != NULL)          if (s != NULL)
                 o = s->curw->window->options;                  o = s->curw->window->options;
Line 678 
Line 680 
         pd->border_lines = lines;          pd->border_lines = lines;
         memcpy(&pd->border_cell, &grid_default_cell, sizeof pd->border_cell);          memcpy(&pd->border_cell, &grid_default_cell, sizeof pd->border_cell);
         style_apply(&pd->border_cell, o, "popup-border-style", NULL);          style_apply(&pd->border_cell, o, "popup-border-style", NULL);
           if (border_style != NULL) {
                   style_set(&sytmp, &grid_default_cell);
                   if (style_parse(&sytmp, &pd->border_cell, border_style) == 0) {
                           pd->border_cell.fg = sytmp.gc.fg;
                           pd->border_cell.bg = sytmp.gc.bg;
                   }
           }
         pd->border_cell.attr = 0;          pd->border_cell.attr = 0;
   
         screen_init(&pd->s, sx - 2, sy - 2, 0);          screen_init(&pd->s, sx - 2, sy - 2, 0);
Line 686 
Line 695 
   
         memcpy(&pd->defaults, &grid_default_cell, sizeof pd->defaults);          memcpy(&pd->defaults, &grid_default_cell, sizeof pd->defaults);
         style_apply(&pd->defaults, o, "popup-style", NULL);          style_apply(&pd->defaults, o, "popup-style", NULL);
           if (style != NULL) {
                   style_set(&sytmp, &grid_default_cell);
                   if (style_parse(&sytmp, &pd->defaults, style) == 0) {
                           pd->defaults.fg = sytmp.gc.fg;
                           pd->defaults.bg = sytmp.gc.bg;
                   }
           }
         pd->defaults.attr = 0;          pd->defaults.attr = 0;
   
         pd->px = px;          pd->px = px;
Line 789 
Line 805 
         xasprintf(&cmd, "%s %s", editor, path);          xasprintf(&cmd, "%s %s", editor, path);
         if (popup_display(POPUP_INTERNAL|POPUP_CLOSEEXIT, BOX_LINES_DEFAULT,          if (popup_display(POPUP_INTERNAL|POPUP_CLOSEEXIT, BOX_LINES_DEFAULT,
             NULL, px, py, sx, sy, NULL, cmd, 0, NULL, _PATH_TMP, NULL, c, NULL,              NULL, px, py, sx, sy, NULL, cmd, 0, NULL, _PATH_TMP, NULL, c, NULL,
             popup_editor_close_cb, pe) != 0) {              NULL, NULL, popup_editor_close_cb, pe) != 0) {
                 popup_editor_free(pe);                  popup_editor_free(pe);
                 free(cmd);                  free(cmd);
                 return (-1);                  return (-1);

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.42