aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKillTheMule <github@pipsfrank.de>2019-02-01 01:40:01 +0100
committerJustin M. Keyes <justinkz@gmail.com>2019-02-01 01:40:01 +0100
commitf89d0d8230f34dca49eddbea179d274955b572b9 (patch)
tree6459c1f59e1d9ede65c0770eb0bd2c401809376c /src
parentada82f3482ffab1d8be7e79255cc018c30f09fab (diff)
downloadrneovim-f89d0d8230f34dca49eddbea179d274955b572b9.tar.gz
rneovim-f89d0d8230f34dca49eddbea179d274955b572b9.tar.bz2
rneovim-f89d0d8230f34dca49eddbea179d274955b572b9.zip
inccommand: auto-disable if folding is slow #9568
Fixes #9557
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_cmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index abdf411fc3..b3ac456979 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -4135,7 +4135,7 @@ skip:
buf_T *preview_buf = NULL;
size_t subsize = preview_lines.subresults.size;
if (preview && !aborting()) {
- if (got_quit) { // Substitution is too slow, disable 'inccommand'.
+ if (got_quit || profile_passed_limit(timeout)) { // Too slow, disable.
set_string_option_direct((char_u *)"icm", -1, (char_u *)"", OPT_FREE,
SID_NONE);
} else if (*p_icm != NUL && pat != NULL) {