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

Diff for /src/usr.bin/tmux/server-client.c between version 1.384 and 1.385

version 1.384, 2021/08/22 13:48:29 version 1.385, 2021/08/27 17:15:57
Line 2443 
Line 2443 
 }  }
   
 /* Get client window. */  /* Get client window. */
 static struct client_window *  struct client_window *
 server_client_get_client_window(struct client *c, u_int id)  server_client_get_client_window(struct client *c, u_int id)
 {  {
         struct client_window    cw = { .window = id };          struct client_window    cw = { .window = id };
Line 2451 
Line 2451 
         return (RB_FIND(client_windows, &c->windows, &cw));          return (RB_FIND(client_windows, &c->windows, &cw));
 }  }
   
   /* Add client window. */
   struct client_window *
   server_client_add_client_window(struct client *c, u_int id)
   {
           struct client_window    *cw;
   
           cw = server_client_get_client_window(c, id);
           if (cw == NULL) {
                   cw = xcalloc(1, sizeof *cw);
                   cw->window = id;
                   RB_INSERT(client_windows, &c->windows, cw);
           }
           return cw;
   }
   
 /* Get client active pane. */  /* Get client active pane. */
 struct window_pane *  struct window_pane *
 server_client_get_pane(struct client *c)  server_client_get_pane(struct client *c)
Line 2479 
Line 2494 
         if (s == NULL)          if (s == NULL)
                 return;                  return;
   
         cw = server_client_get_client_window(c, s->curw->window->id);          cw = server_client_add_client_window(c, s->curw->window->id);
         if (cw == NULL) {  
                 cw = xcalloc(1, sizeof *cw);  
                 cw->window = s->curw->window->id;  
                 RB_INSERT(client_windows, &c->windows, cw);  
         }  
         cw->pane = wp;          cw->pane = wp;
         log_debug("%s pane now %%%u", c->name, wp->id);          log_debug("%s pane now %%%u", c->name, wp->id);
 }  }

Legend:
Removed from v.1.384  
changed lines
  Added in v.1.385