0
0
mirror of https://github.com/vim/vim.git synced 2025-10-06 05:44:14 -04:00

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.
This commit is contained in:
Bram Moolenaar
2020-03-20 19:37:47 +01:00
parent 20431c9dbb
commit f1ec378b01
4 changed files with 25 additions and 9 deletions

View File

@@ -2223,6 +2223,19 @@ 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;
ui_breakcheck();
}
}
#if defined(VIM_BACKTICK) || defined(FEAT_EVAL) \
|| (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
|| defined(PROTO)