diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-11-03 16:52:20 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-11-03 16:58:22 +0800 |
commit | 981fa11c91d3655828b4f70ccf7d079d917d5b6b (patch) | |
tree | fc0e5caebf9d3af58106092d27d3c0f20d4212ef /test | |
parent | 99acc9de559a2ea3b9de2b418dbcae774d1d9a75 (diff) | |
download | rneovim-981fa11c91d3655828b4f70ccf7d079d917d5b6b.tar.gz rneovim-981fa11c91d3655828b4f70ccf7d079d917d5b6b.tar.bz2 rneovim-981fa11c91d3655828b4f70ccf7d079d917d5b6b.zip |
vim-patch:9.1.0832: :set doesn't work for 'cot' and 'bkc' after :setlocal
Problem: :set doesn't work for 'cot' and 'bkc' after :setlocal.
Solution: clear the local flags when using :set (zeertzjq).
closes: vim/vim#15981
https://github.com/vim/vim/commit/46dcd84d242db6b053cb5b777c896cede9ad9b27
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_ins_complete.vim | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/old/testdir/test_ins_complete.vim b/test/old/testdir/test_ins_complete.vim index 8e2a7c4631..01695d5be5 100644 --- a/test/old/testdir/test_ins_complete.vim +++ b/test/old/testdir/test_ins_complete.vim @@ -950,6 +950,46 @@ func Test_completeopt_buffer_local() call assert_equal('menu', &completeopt) call assert_equal('menu', &g:completeopt) + new | only + call setline(1, ['foofoo', 'foobar', 'foobaz', '']) + set completeopt& + setlocal completeopt=menu,fuzzy,noinsert + setglobal completeopt=menu,longest + call assert_equal('menu,fuzzy,noinsert', &completeopt) + call assert_equal('menu,fuzzy,noinsert', &l:completeopt) + call assert_equal('menu,longest', &g:completeopt) + call feedkeys("Gccf\<C-X>\<C-N>bz\<C-Y>", 'tnix') + call assert_equal('foobaz', getline('.')) + setlocal bufhidden=wipe + new | only! + call setline(1, ['foofoo', 'foobar', 'foobaz', '']) + call assert_equal('menu,longest', &completeopt) + call assert_equal('menu,longest', &g:completeopt) + call assert_equal('', &l:completeopt) + call feedkeys("Gccf\<C-X>\<C-N>\<C-X>\<C-Z>", 'tnix') + call assert_equal('foo', getline('.')) + bwipe! + + new | only + call setline(1, ['foofoo', 'foobar', 'foobaz', '']) + set completeopt& + setlocal completeopt=menu,fuzzy,noinsert + set completeopt=menu,longest + call assert_equal('menu,longest', &completeopt) + call assert_equal('menu,longest', &g:completeopt) + call assert_equal('', &l:completeopt) + call feedkeys("Gccf\<C-X>\<C-N>\<C-X>\<C-Z>", 'tnix') + call assert_equal('foo', getline('.')) + setlocal bufhidden=wipe + new | only! + call setline(1, ['foofoo', 'foobar', 'foobaz', '']) + call assert_equal('menu,longest', &completeopt) + call assert_equal('menu,longest', &g:completeopt) + call assert_equal('', &l:completeopt) + call feedkeys("Gccf\<C-X>\<C-N>\<C-X>\<C-Z>", 'tnix') + call assert_equal('foo', getline('.')) + bwipe! + set completeopt& endfunc |