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/testdir | |
| 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/testdir')
| -rw-r--r-- | src/nvim/testdir/test_ins_complete.vim | 19 | ||||
| -rw-r--r-- | src/nvim/testdir/test_popup.vim | 4 | ||||
| -rw-r--r-- | src/nvim/testdir/test_quickfix.vim | 2 |
3 files changed, 9 insertions, 16 deletions
diff --git a/src/nvim/testdir/test_ins_complete.vim b/src/nvim/testdir/test_ins_complete.vim index 532685b9de..563d8812f7 100644 --- a/src/nvim/testdir/test_ins_complete.vim +++ b/src/nvim/testdir/test_ins_complete.vim @@ -628,31 +628,24 @@ func Test_completefunc_error() call setline(1, ['', 'abcd', '']) call assert_fails('exe "normal 2G$a\<C-X>\<C-U>"', 'E565:') - set completefunc& - delfunc CompleteFunc - delfunc CompleteFunc2 - close! -endfunc - -func Test_completefunc_error_not_asan() - " The following test causes an ASAN failure. - CheckNotAsan - " Jump to a different window from the complete function - func! CompleteFunc(findstart, base) + func CompleteFunc3(findstart, base) if a:findstart == 1 return col('.') - 1 endif wincmd p return ['a', 'b'] endfunc - set completefunc=CompleteFunc + set completefunc=CompleteFunc3 new - call assert_fails('exe "normal a\<C-X>\<C-U>"', 'E839:') + call assert_fails('exe "normal a\<C-X>\<C-U>"', 'E565:') close! set completefunc& delfunc CompleteFunc + delfunc CompleteFunc2 + delfunc CompleteFunc3 + close! endfunc " Test for returning non-string values from 'completefunc' diff --git a/src/nvim/testdir/test_popup.vim b/src/nvim/testdir/test_popup.vim index 7afa31a6d1..aef32fc504 100644 --- a/src/nvim/testdir/test_popup.vim +++ b/src/nvim/testdir/test_popup.vim @@ -655,8 +655,8 @@ func Test_complete_func_mess() set completefunc=MessComplete new call setline(1, 'Ju') - call feedkeys("A\<c-x>\<c-u>/\<esc>", 'tx') - call assert_equal('Oct/Oct', getline(1)) + call assert_fails('call feedkeys("A\<c-x>\<c-u>/\<esc>", "tx")', 'E565:') + call assert_equal('Jan/', getline(1)) bwipe! set completefunc= endfunc diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 290fc488f1..ddd4229f17 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -3143,7 +3143,7 @@ endfunc func Test_vimgrep_with_textlock() new - " Simple way to execute something with "textwinlock" set. + " Simple way to execute something with "textlock" set. " Check that vimgrep without jumping can be executed. au InsertCharPre * vimgrep /RunTheTest/j runtest.vim normal ax |