diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-01-29 21:07:07 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-01-29 21:07:07 +0100 |
commit | 28976e2accf11591c60e8a658a9e03544f0408b2 (patch) | |
tree | 5e0ad5064936b05fd30e1eb7c946d8afeaf848b3 /src/testdir/test_ins_complete.vim | |
parent | df2c2988bbaecd28b0fbec8d64327b1bbb005e19 (diff) |
patch 8.2.2426: allowing 'completefunc' to switch windows causes troublev8.2.2426
Problem: Allowing 'completefunc' to switch windows causes trouble.
Solution: use "textwinlock" instead of "textlock".
Diffstat (limited to 'src/testdir/test_ins_complete.vim')
-rw-r--r-- | src/testdir/test_ins_complete.vim | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim index 5aa26645bf..489c1d9d94 100644 --- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -562,31 +562,24 @@ func Test_completefunc_error() call setline(1, ['', 'abcd', '']) call assert_fails('exe "normal 2G$a\<C-X>\<C-U>"', 'E578:') - 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' |