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

Diff for /src/usr.bin/tmux/server-fn.c between version 1.132 and 1.133

version 1.132, 2021/08/17 16:19:00 version 1.133, 2022/03/08 18:31:46
Line 312 
Line 312 
         struct window           *w = wp->window;          struct window           *w = wp->window;
         struct screen_write_ctx  ctx;          struct screen_write_ctx  ctx;
         struct grid_cell         gc;          struct grid_cell         gc;
         time_t                   t;  
         char                     tim[26];  
         int                      remain_on_exit;          int                      remain_on_exit;
           const char              *s;
           char                    *expanded;
           u_int                    sx = screen_size_x(&wp->base);
           u_int                    sy = screen_size_y(&wp->base);
   
         if (wp->fd != -1) {          if (wp->fd != -1) {
                 bufferevent_free(wp->event);                  bufferevent_free(wp->event);
Line 338 
Line 340 
                         return;                          return;
                 wp->flags |= PANE_STATUSDRAWN;                  wp->flags |= PANE_STATUSDRAWN;
   
                   gettimeofday(&wp->dead_time, NULL);
                 if (notify)                  if (notify)
                         notify_pane("pane-died", wp);                          notify_pane("pane-died", wp);
   
                 screen_write_start_pane(&ctx, wp, &wp->base);                  s = options_get_string(wp->options, "remain-on-exit-format");
                 screen_write_scrollregion(&ctx, 0, screen_size_y(ctx.s) - 1);                  if (*s != '\0') {
                 screen_write_cursormove(&ctx, 0, screen_size_y(ctx.s) - 1, 0);                          screen_write_start_pane(&ctx, wp, &wp->base);
                 screen_write_linefeed(&ctx, 1, 8);                          screen_write_scrollregion(&ctx, 0, sy - 1);
                 memcpy(&gc, &grid_default_cell, sizeof gc);                          screen_write_cursormove(&ctx, 0, sy - 1, 0);
                           screen_write_linefeed(&ctx, 1, 8);
                           memcpy(&gc, &grid_default_cell, sizeof gc);
   
                 time(&t);                          expanded = format_single(NULL, s, NULL, NULL, NULL, wp);
                 ctime_r(&t, tim);                          format_draw(&ctx, &gc, sx, expanded, NULL, 0);
                 tim[strcspn(tim, "\n")] = '\0';                          free(expanded);
   
                 if (WIFEXITED(wp->status)) {                          screen_write_stop(&ctx);
                         screen_write_nputs(&ctx, -1, &gc,  
                             "Pane is dead (status %d, %s)",  
                             WEXITSTATUS(wp->status),  
                             tim);  
                 } else if (WIFSIGNALED(wp->status)) {  
                         screen_write_nputs(&ctx, -1, &gc,  
                             "Pane is dead (signal %s, %s)",  
                             sig2name(WTERMSIG(wp->status)),  
                             tim);  
                 }                  }
                   wp->base.mode &= ~MODE_CURSOR;
   
                 screen_write_stop(&ctx);  
                 wp->flags |= PANE_REDRAW;                  wp->flags |= PANE_REDRAW;
                 return;                  return;
         }          }

Legend:
Removed from v.1.132  
changed lines
  Added in v.1.133