summaryrefslogtreecommitdiffstats
path: root/input.c
diff options
context:
space:
mode:
authornicm <nicm>2020-10-30 11:34:13 +0000
committernicm <nicm>2020-10-30 11:34:13 +0000
commit8e1d28453d23d6283abe1bb709a4fe06139d2750 (patch)
treee5790c8114bf262a57ac8ed97b7e2e4eadded764 /input.c
parent02197f20d0809a5c248a32ef0ca3a45c7e3566bd (diff)
Limit range of repeat to avoid silly high numbers causing delays, from
Sergey Nizovtsev.
Diffstat (limited to 'input.c')
-rw-r--r--input.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/input.c b/input.c
index c280c0d9..8b7ba08a 100644
--- a/input.c
+++ b/input.c
@@ -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;