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/edit.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/edit.c')
-rw-r--r-- | src/nvim/edit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 2abe9068eb..c6773b3395 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -3961,7 +3961,9 @@ static void expand_by_function(int type, char_u *base) pos = curwin->w_cursor; curwin_save = curwin; curbuf_save = curbuf; - // Lock the text to avoid weird things from happening. + // Lock the text to avoid weird things from happening. Also disallow + // switching to another window, it should not be needed and may end up in + // Insert mode in another buffer. textlock++; // Call a function, which returns a list or dict. |