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.
This commit is contained in:
nicm
2020-05-21 07:24:13 +00:00
parent 6bde1c1837
commit 31e3f2d530
11 changed files with 357 additions and 95 deletions

View File

@ -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))