diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-07-17 11:47:34 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-07-17 13:51:46 +0800 |
commit | f72ec959580e44d84d944f1c50852e56eb7fc1ad (patch) | |
tree | 9dae85fd9d89ddc276c03371b9f03f8865492e75 /src/nvim/eval/funcs.c | |
parent | b0bbcfa2392a0b6c58274baf5facadda6cdff10a (diff) | |
download | rneovim-f72ec959580e44d84d944f1c50852e56eb7fc1ad.tar.gz rneovim-f72ec959580e44d84d944f1c50852e56eb7fc1ad.tar.bz2 rneovim-f72ec959580e44d84d944f1c50852e56eb7fc1ad.zip |
vim-patch:8.2.2426: allowing 'completefunc' to switch windows causes trouble
Problem: Allowing 'completefunc' to switch windows causes trouble.
Solution: use "textwinlock" instead of "textlock".
https://github.com/vim/vim/commit/28976e2accf11591c60e8a658a9e03544f0408b2
Assert E565 instead of E578.
vim-patch:8.2.0670: cannot change window when evaluating 'completefunc'
Problem: Cannot change window when evaluating 'completefunc'.
Solution: Make a difference between not changing text or buffers and also
not changing window.
https://github.com/vim/vim/commit/6adb9ea0a6ca01414f4b591f379b0f829a8273c0
vim-patch:8.2.5029: "textlock" is always zero
Problem: "textlock" is always zero.
Solution: Remove "textlock" and rename "textwinlock" to "textlock".
(closes vim/vim#10489)
https://github.com/vim/vim/commit/cfe456543e840d133399551f8626d985e1fb1958
Diffstat (limited to 'src/nvim/eval/funcs.c')
-rw-r--r-- | src/nvim/eval/funcs.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index f231146d7c..80586caf8e 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -1062,11 +1062,6 @@ static void f_complete(typval_T *argvars, typval_T *rettv, FunPtr fptr) return; } - const int save_textlock = textlock; - // "textlock" is set when evaluating 'completefunc' but we can change text - // here. - textlock = 0; - // Check for undo allowed here, because if something was already inserted // the line was already saved for undo and this check isn't done. if (!undo_allowed(curbuf)) { @@ -1081,7 +1076,6 @@ static void f_complete(typval_T *argvars, typval_T *rettv, FunPtr fptr) set_completion(startcol - 1, argvars[1].vval.v_list); } } - textlock = save_textlock; } /// "complete_add()" function |