diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2021-10-17 16:37:29 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2021-11-06 14:24:46 +0100 |
commit | 2dc0af3a4ff16d311169ce2ecd120dd05778039c (patch) | |
tree | d261dc8ace960132956cf2bcaf9f2104a212511a /src/nvim/testdir | |
parent | b092171e7c632a2a6c8841056302ae281d993168 (diff) | |
download | rneovim-2dc0af3a4ff16d311169ce2ecd120dd05778039c.tar.gz rneovim-2dc0af3a4ff16d311169ce2ecd120dd05778039c.tar.bz2 rneovim-2dc0af3a4ff16d311169ce2ecd120dd05778039c.zip |
vim-patch:8.2.3528: 'thesaurus' and 'thesaurusfunc' do not have the same scope
Problem: 'thesaurus' and 'thesaurusfunc' do not have the same scope.
Solution: Make 'thesaurusfunc' global-local.
https://github.com/vim/vim/commit/f4d8b76d304dabc39c06d2344cd4c7b28484811b
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_edit.vim | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/nvim/testdir/test_edit.vim b/src/nvim/testdir/test_edit.vim index 9a35129232..23ad8dbfc5 100644 --- a/src/nvim/testdir/test_edit.vim +++ b/src/nvim/testdir/test_edit.vim @@ -900,16 +900,24 @@ endfunc func Test_thesaurus_func() new - set thesaurus= - set thesaurusfunc=MyThesaurus + set thesaurus=notused + set thesaurusfunc=NotUsed + setlocal thesaurusfunc=MyThesaurus call setline(1, "an ki") call cursor(1, 1) call feedkeys("A\<c-x>\<c-t>\<c-n>\<cr>\<esc>", 'tnix') call assert_equal(['an amiable', ''], getline(1, '$')) + + setlocal thesaurusfunc=NonExistingFunc + call assert_fails("normal $a\<C-X>\<C-T>", 'E117:') + + setlocal thesaurusfunc= set thesaurusfunc=NonExistingFunc call assert_fails("normal $a\<C-X>\<C-T>", 'E117:') - set thesaurusfunc& %bw! + + set thesaurusfunc= + set thesaurus= endfunc func Test_edit_CTRL_U() |