summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-30 22:31:18 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-30 22:31:18 +0200
commit6adb9ea0a6ca01414f4b591f379b0f829a8273c0 (patch)
tree8af9e5e5b2ea5d0a76e0fb1b393835c46674b27f /src/edit.c
parent4e5534fab798ab7c95554da3bc80b08336aedc2b (diff)
patch 8.2.0670: cannot change window when evaluating 'completefunc'v8.2.0670
Problem: Cannot change window when evaluating 'completefunc'. Solution: Make a difference between not changing text or buffers and also not changing window.
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/edit.c b/src/edit.c
index 7f4f765012..0ac63ec8fd 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -176,9 +176,10 @@ edit(
// Don't allow changes in the buffer while editing the cmdline. The
// caller of getcmdline() may get confused.
// Don't allow recursive insert mode when busy with completion.
- if (textlock != 0 || ins_compl_active() || compl_busy || pum_visible())
+ if (textwinlock != 0 || textlock != 0
+ || ins_compl_active() || compl_busy || pum_visible())
{
- emsg(_(e_textlock));
+ emsg(_(e_textwinlock));
return FALSE;
}
ins_compl_clear(); // clear stuff for CTRL-X mode
@@ -5944,7 +5945,7 @@ do_insert_char_pre(int c)
}
// Lock the text to avoid weird things from happening.
- ++textlock;
+ ++textwinlock;
set_vim_var_string(VV_CHAR, buf, -1); // set v:char
res = NULL;
@@ -5958,7 +5959,7 @@ do_insert_char_pre(int c)
}
set_vim_var_string(VV_CHAR, NULL, -1); // clear v:char
- --textlock;
+ --textwinlock;
// Restore the State, it may have been changed.
State = save_State;