diff options
author | 2020-05-21 07:24:13 +0000 | |
---|---|---|
committer | 2020-05-21 07:24:13 +0000 | |
commit | 2920028da3278b9d3a2cc48a0277cf5ea9cbac41 (patch) | |
tree | aa5baf6257ac8429a311db1d5bb35eb4815b64cf /usr.bin/tmux/input.c | |
parent | don't count packets in the carp protocol handling against an interface. (diff) | |
download | wireguard-openbsd-2920028da3278b9d3a2cc48a0277cf5ea9cbac41.tar.xz wireguard-openbsd-2920028da3278b9d3a2cc48a0277cf5ea9cbac41.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 'usr.bin/tmux/input.c')
-rw-r--r-- | usr.bin/tmux/input.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c index c1e9e0c650c..7c9e544b7db 100644 --- a/usr.bin/tmux/input.c +++ b/usr.bin/tmux/input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: input.c,v 1.178 2020/05/16 16:44:54 nicm Exp $ */ +/* $OpenBSD: input.c,v 1.179 2020/05/21 07:24:13 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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)) |