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

Diff for /src/usr.bin/tmux/control-notify.c between version 1.26 and 1.27

version 1.26, 2020/03/16 09:12:44 version 1.27, 2020/05/21 07:24:13
Line 27 
Line 27 
         ((c) != NULL && ((c)->flags & CLIENT_CONTROL))          ((c) != NULL && ((c)->flags & CLIENT_CONTROL))
   
 void  void
 control_notify_input(struct client *c, struct window_pane *wp,  
     const u_char *buf, size_t len)  
 {  
         struct evbuffer *message;  
         u_int            i;  
   
         if (c->session == NULL)  
             return;  
   
         if (c->flags & CLIENT_CONTROL_NOOUTPUT)  
                 return;  
   
         /*  
          * Only write input if the window pane is linked to a window belonging  
          * to the client's session.  
          */  
         if (winlink_find_by_window(&c->session->windows, wp->window) != NULL) {  
                 message = evbuffer_new();  
                 if (message == NULL)  
                         fatalx("out of memory");  
                 evbuffer_add_printf(message, "%%output %%%u ", wp->id);  
                 for (i = 0; i < len; i++) {  
                         if (buf[i] < ' ' || buf[i] == '\\')  
                             evbuffer_add_printf(message, "\\%03o", buf[i]);  
                         else  
                             evbuffer_add_printf(message, "%c", buf[i]);  
                 }  
                 evbuffer_add(message, "", 1);  
                 control_write(c, "%s", EVBUFFER_DATA(message));  
                 evbuffer_free(message);  
         }  
 }  
   
 void  
 control_notify_pane_mode_changed(int pane)  control_notify_pane_mode_changed(int pane)
 {  {
         struct client   *c;          struct client   *c;

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27