diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2012-03-20 11:01:01 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2012-03-20 11:01:01 +0000 |
commit | 6cc19c0e25db197e4936c72bccee94fe437fd774 (patch) | |
tree | 3bc3b8a5f842c010724d87cf9f042c1814e37f59 /usr.bin/tmux/options-table.c | |
parent | c99c9ef7592d38921c978efcf49a95e63665b991 (diff) |
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 'usr.bin/tmux/options-table.c')
-rw-r--r-- | usr.bin/tmux/options-table.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/usr.bin/tmux/options-table.c b/usr.bin/tmux/options-table.c index 7070d22931b..45affd4e96e 100644 --- a/usr.bin/tmux/options-table.c +++ b/usr.bin/tmux/options-table.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options-table.c,v 1.24 2012/03/17 21:40:53 nicm Exp $ */ +/* $OpenBSD: options-table.c,v 1.25 2012/03/20 11:01:00 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net> @@ -465,6 +465,21 @@ const struct options_table_entry window_options_table[] = { .default_num = 1 }, + + { .name = "c0-change-trigger", + .type = OPTIONS_TABLE_NUMBER, + .default_num = 50, + .minimum = 0, + .maximum = USHRT_MAX + }, + + { .name = "c0-change-interval", + .type = OPTIONS_TABLE_NUMBER, + .default_num = 100, + .minimum = 1, + .maximum = USHRT_MAX + }, + { .name = "clock-mode-colour", .type = OPTIONS_TABLE_COLOUR, .default_num = 4 |