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/ex_getln.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/ex_getln.c')
-rw-r--r-- | src/nvim/ex_getln.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 92c9d83045..4c26cfe500 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -2696,14 +2696,12 @@ char_u *get_cmdprompt(void) return ccline.cmdprompt; } -/* - * Return TRUE when the text must not be changed and we can't switch to - * another window or buffer. Used when editing the command line etc. - */ -int text_locked(void) +/// Return true when the text must not be changed and we can't switch to +/// another window or buffer. True when editing the command line etc. +bool text_locked(void) { if (cmdwin_type != 0) { - return TRUE; + return true; } return textlock != 0; } |