diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-10-30 11:34:14 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-10-30 11:34:14 +0000 |
commit | 363280571c3bccf29e1f02ba5d9884df08010d95 (patch) | |
tree | 6e970f39af5df7798810ce85edacad75bdb7b477 /usr.bin/tmux/input.c | |
parent | dc6b6b32fc4962ecbea8813dbfa3bc5ec04ee52d (diff) |
Limit range of repeat to avoid silly high numbers causing delays, from
Sergey Nizovtsev.
Diffstat (limited to 'usr.bin/tmux/input.c')
-rw-r--r-- | usr.bin/tmux/input.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c index 8f1e2f951a7..5b427b78046 100644 --- a/usr.bin/tmux/input.c +++ b/usr.bin/tmux/input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: input.c,v 1.184 2020/10/29 16:33:01 nicm Exp $ */ +/* $OpenBSD: input.c,v 1.185 2020/10/30 11:34:13 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1545,6 +1545,10 @@ input_csi_dispatch(struct input_ctx *ictx) if (n == -1) break; + m = screen_size_x(s) - s->cx; + if (n > m) + n = m; + if (ictx->last == -1) break; ictx->ch = ictx->last; |