summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-21 22:01:14 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-21 22:01:14 +0200
commitff06f283e3e4b3ec43012dd3b83f8454c98f6639 (patch)
tree61a07e0fa072ae02212421515c60745109f2b924 /src/edit.c
parent1966c248814d5195edcd1208ed0e51e664a61283 (diff)
patch 8.2.0614: get ml_get error when deleting a line in 'completefunc'v8.2.0614
Problem: Get ml_get error when deleting a line in 'completefunc'. (Yegappan Lakshmanan) Solution: Lock the text while evaluating 'completefunc'.
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/edit.c b/src/edit.c
index 3f0803f685..05518ceab8 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -175,16 +175,10 @@ edit(
#endif
// Don't allow changes in the buffer while editing the cmdline. The
// caller of getcmdline() may get confused.
- if (textlock != 0)
- {
- emsg(_(e_secure));
- return FALSE;
- }
-
// Don't allow recursive insert mode when busy with completion.
- if (ins_compl_active() || compl_busy || pum_visible())
+ if (textlock != 0 || ins_compl_active() || compl_busy || pum_visible())
{
- emsg(_(e_secure));
+ emsg(_(e_textlock));
return FALSE;
}
ins_compl_clear(); // clear stuff for CTRL-X mode