diff options
author | Tiago Cunha <tcunha@gmx.com> | 2012-03-29 21:05:16 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2012-03-29 21:05:16 +0000 |
commit | f9f6eea4441bb62634b35d17ded3b4c7d460dea6 (patch) | |
tree | 015ef836b6492dc82750b502e0257d9af53d6af6 /tmux.h | |
parent | 621fa0a686cab46de5906b6a1c5ef2fac197a49e (diff) | |
download | rtmux-f9f6eea4441bb62634b35d17ded3b4c7d460dea6.tar.gz rtmux-f9f6eea4441bb62634b35d17ded3b4c7d460dea6.tar.bz2 rtmux-f9f6eea4441bb62634b35d17ded3b4c7d460dea6.zip |
Sync OpenBSD patchset 1072:
Add a simple form of output rate limiting by counting the number of
certain C0 sequences (linefeeds, backspaces, carriage returns) and if it
exceeds a threshold (current default 50/millisecond), start to redraw
the pane every 100 milliseconds instead of making each change as it
comes. Two configuration options - c0-change-trigger and
c0-change-interval.
This makes tmux much more responsive under very fast output (for example
yes(1) or accidentally cat'ing a large file) but may not be perfect on
all terminals and connections - feedback very welcome, particularly
where this change has a negative rather than positive effect (making it
off by default is a possibility).
After much experimentation based originally on a request Robin Lee
Powell (which ended with a completely different solution), this idea
from discussion with Ailin Nemui.
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -807,6 +807,7 @@ struct window_pane { int flags; #define PANE_REDRAW 0x1 +#define PANE_DROP 0x2 char *cmd; char *shell; @@ -815,6 +816,10 @@ struct window_pane { pid_t pid; char tty[TTY_NAME_MAX]; + u_int changes; + struct event changes_timer; + u_int changes_redraw; + int fd; struct bufferevent *event; @@ -1959,6 +1964,7 @@ void window_destroy_panes(struct window *); struct window_pane *window_pane_find_by_id(u_int); struct window_pane *window_pane_create(struct window *, u_int, u_int, u_int); void window_pane_destroy(struct window_pane *); +void window_pane_timer_start(struct window_pane *); int window_pane_spawn(struct window_pane *, const char *, const char *, const char *, struct environ *, struct termios *, char **); @@ -1977,7 +1983,6 @@ int window_pane_visible(struct window_pane *); char *window_pane_search( struct window_pane *, const char *, u_int *); char *window_printable_flags(struct session *, struct winlink *); - struct window_pane *window_pane_find_up(struct window_pane *); struct window_pane *window_pane_find_down(struct window_pane *); struct window_pane *window_pane_find_left(struct window_pane *); |