From db8682b94ec92e443a3d3e093732d3174075a5ee Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 11 Jul 2020 21:10:25 -0400 Subject: vim-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. https://github.com/vim/vim/commit/f1ec378b014efb9897422c40369a6462163a512a Vim9 test, commented out in this patch, is restored in patch 8.2.0421. Vim9 tests were not ported over so skip the temporary change. Vim should stop pushing broken commits on master. --- src/nvim/misc1.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index e10770b6bd..6dafbafb3e 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -1029,6 +1029,15 @@ void fast_breakcheck(void) } } +// Like line_breakcheck() but check 100 times less often. +void veryfast_breakcheck(void) +{ + if (++breakcheck_count >= BREAKCHECK_SKIP * 100) { + breakcheck_count = 0; + os_breakcheck(); + } +} + /// os_call_shell() wrapper. Handles 'verbose', :profile, and v:shell_error. /// Invalidates cached tags. /// -- cgit