From 31e3f2d530090793815d145a16a1ce3b469c4266 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 21 May 2020 07:24:13 +0000 Subject: 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. --- input.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'input.c') diff --git a/input.c b/input.c index 44b1b948..7bb69663 100644 --- a/input.c +++ b/input.c @@ -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)) -- cgit