summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-05-27 17:26:55 +0100
committerBram Moolenaar <Bram@vim.org>2022-05-27 17:26:55 +0100
commitcfe456543e840d133399551f8626d985e1fb1958 (patch)
tree88e1820132eef74ed7abab2334d51019cb6f47d2 /src/edit.c
parent02e8d4e4ffcdd6ee919e19692d591da8e18a565d (diff)
patch 8.2.5029: "textlock" is always zerov8.2.5029
Problem: "textlock" is always zero. Solution: Remove "textlock" and rename "textwinlock" to "textlock". (closes #10489)
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/edit.c b/src/edit.c
index 939aeb9d66..443e023d5c 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -168,8 +168,7 @@ 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 (textwinlock != 0 || textlock != 0
- || ins_compl_active() || compl_busy || pum_visible())
+ if (textlock != 0 || ins_compl_active() || compl_busy || pum_visible())
{
emsg(_(e_not_allowed_to_change_text_or_change_window));
return FALSE;
@@ -5342,7 +5341,7 @@ do_insert_char_pre(int c)
}
// Lock the text to avoid weird things from happening.
- ++textwinlock;
+ ++textlock;
set_vim_var_string(VV_CHAR, buf, -1); // set v:char
res = NULL;
@@ -5356,7 +5355,7 @@ do_insert_char_pre(int c)
}
set_vim_var_string(VV_CHAR, NULL, -1); // clear v:char
- --textwinlock;
+ --textlock;
// Restore the State, it may have been changed.
State = save_State;