aboutsummaryrefslogtreecommitdiff
path: root/options-table.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2012-03-29 21:05:16 +0000
committerTiago Cunha <tcunha@gmx.com>2012-03-29 21:05:16 +0000
commitf9f6eea4441bb62634b35d17ded3b4c7d460dea6 (patch)
tree015ef836b6492dc82750b502e0257d9af53d6af6 /options-table.c
parent621fa0a686cab46de5906b6a1c5ef2fac197a49e (diff)
downloadrtmux-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 'options-table.c')
-rw-r--r--options-table.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/options-table.c b/options-table.c
index 86610b98..6f868e58 100644
--- a/options-table.c
+++ b/options-table.c
@@ -464,6 +464,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