patch 8.2.0420: Vim9: cannot interrupt a loop with CTRL-C
Problem: Vim9: cannot interrupt a loop with CTRL-C.
Solution: Check for CTRL-C once in a while. Doesn't fully work yet.
diff --git a/src/misc1.c b/src/misc1.c
index 80aefd8..b4b74f7 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -2223,6 +2223,19 @@
}
}
+/*
+ * Like line_breakcheck() but check 100 times less often.
+ */
+ void
+veryfast_breakcheck(void)
+{
+ if (++breakcheck_count >= BREAKCHECK_SKIP * 100)
+ {
+ breakcheck_count = 0;
+ ui_breakcheck();
+ }
+}
+
#if defined(VIM_BACKTICK) || defined(FEAT_EVAL) \
|| (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
|| defined(PROTO)