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

Diff for /src/usr.bin/tmux/input.c between version 1.21 and 1.22

version 1.21, 2009/10/26 21:42:04 version 1.22, 2009/11/04 22:43:11
Line 256 
Line 256 
         struct input_ctx        *ictx = &wp->ictx;          struct input_ctx        *ictx = &wp->ictx;
         u_char                   ch;          u_char                   ch;
   
         if (BUFFER_USED(wp->in) == ictx->was)          if (EVBUFFER_LENGTH(wp->event->input) == ictx->was)
                 return;                  return;
         wp->window->flags |= WINDOW_ACTIVITY;          wp->window->flags |= WINDOW_ACTIVITY;
   
         ictx->buf = BUFFER_OUT(wp->in);          ictx->buf = EVBUFFER_DATA(wp->event->input);
         ictx->len = BUFFER_USED(wp->in);          ictx->len = EVBUFFER_LENGTH(wp->event->input);
         ictx->off = 0;          ictx->off = 0;
   
         ictx->wp = wp;          ictx->wp = wp;
Line 278 
Line 278 
   
         screen_write_stop(&ictx->ctx);          screen_write_stop(&ictx->ctx);
   
         buffer_remove(wp->in, ictx->len);          evbuffer_drain(wp->event->input, ictx->len);
         ictx->was = BUFFER_USED(wp->in);          ictx->was = EVBUFFER_LENGTH(wp->event->input);
 }  }
   
 void  void
Line 932 
Line 932 
 void  void
 input_handle_sequence_da(struct input_ctx *ictx)  input_handle_sequence_da(struct input_ctx *ictx)
 {  {
         uint16_t        n;          struct window_pane      *wp = ictx->wp;
           uint16_t                 n;
   
         if (ictx->private != '\0')          if (ictx->private != '\0')
                 return;                  return;
Line 944 
Line 945 
         if (n != 0)          if (n != 0)
                 return;                  return;
   
         buffer_write(ictx->wp->out, "\033[?1;2c", (sizeof "\033[?1;2c") - 1);          bufferevent_write(wp->event, "\033[?1;2c", (sizeof "\033[?1;2c") - 1);
 }  }
   
 void  void
Line 1314 
Line 1315 
 void  void
 input_handle_sequence_dsr(struct input_ctx *ictx)  input_handle_sequence_dsr(struct input_ctx *ictx)
 {  {
         struct screen  *s = ictx->ctx.s;          struct window_pane      *wp = ictx->wp;
         uint16_t        n;          struct screen           *s = ictx->ctx.s;
         char            reply[32];          uint16_t                 n;
           char                    reply[32];
   
         if (ARRAY_LENGTH(&ictx->args) > 1)          if (ARRAY_LENGTH(&ictx->args) > 1)
                 return;                  return;
Line 1329 
Line 1331 
                         xsnprintf(reply, sizeof reply,                          xsnprintf(reply, sizeof reply,
                             "\033[%u;%uR", s->cy + 1, s->cx + 1);                              "\033[%u;%uR", s->cy + 1, s->cx + 1);
                         log_debug("cursor request, reply: %s", reply);                          log_debug("cursor request, reply: %s", reply);
                         buffer_write(ictx->wp->out, reply, strlen(reply));                          bufferevent_write(wp->event, reply, strlen(reply));
                         break;                          break;
                 }                  }
         }          }

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22