From 8e1d28453d23d6283abe1bb709a4fe06139d2750 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 30 Oct 2020 11:34:13 +0000 Subject: [PATCH] Limit range of repeat to avoid silly high numbers causing delays, from Sergey Nizovtsev. --- input.c | 4 ++++ 1 file changed, 4 insertions(+) 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;