diff options
author | nicm <nicm> | 2020-05-21 07:24:13 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-05-21 07:24:13 +0000 |
commit | 31e3f2d530090793815d145a16a1ce3b469c4266 (patch) | |
tree | cdca6cd9bcf0eea85d61053f1bb4aa2d2d1c81a7 /input.c | |
parent | 6bde1c183766d0637633c1460cf6b17b57bc0280 (diff) | |
download | rtmux-31e3f2d530090793815d145a16a1ce3b469c4266.tar.gz rtmux-31e3f2d530090793815d145a16a1ce3b469c4266.tar.bz2 rtmux-31e3f2d530090793815d145a16a1ce3b469c4266.zip |
Support code for control mode flow control: allow clients to have
separate offsets (used and acknowleged) into the pane buffers; turn off
reading from panes when no clients can accept the data; and add a -A
flag to refresh-client to let clients turn receiving a pane on and off.
Diffstat (limited to 'input.c')
-rw-r--r-- | input.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -942,10 +942,12 @@ input_parse(struct input_ctx *ictx, u_char *buf, size_t len) void input_parse_pane(struct window_pane *wp) { - struct evbuffer *evb = wp->event->input; + void *new_data; + size_t new_size; - input_parse_buffer(wp, EVBUFFER_DATA(evb), EVBUFFER_LENGTH(evb)); - evbuffer_drain(evb, EVBUFFER_LENGTH(evb)); + new_data = window_pane_get_new_data(wp, &wp->offset, &new_size); + input_parse_buffer(wp, new_data, new_size); + window_pane_update_used_data(wp, &wp->offset, new_size, 1); } /* Parse given input. */ @@ -960,7 +962,6 @@ input_parse_buffer(struct window_pane *wp, u_char *buf, size_t len) window_update_activity(wp->window); wp->flags |= PANE_CHANGED; - notify_input(wp, buf, len); /* NULL wp if there is a mode set as don't want to update the tty. */ if (TAILQ_EMPTY(&wp->modes)) |