From 2dc0af3a4ff16d311169ce2ecd120dd05778039c Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Sun, 17 Oct 2021 16:37:29 +0200 Subject: 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 --- src/nvim/testdir/test_edit.vim | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/nvim/testdir') 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\\\\\", 'tnix') call assert_equal(['an amiable', ''], getline(1, '$')) + + setlocal thesaurusfunc=NonExistingFunc + call assert_fails("normal $a\\", 'E117:') + + setlocal thesaurusfunc= set thesaurusfunc=NonExistingFunc call assert_fails("normal $a\\", 'E117:') - set thesaurusfunc& %bw! + + set thesaurusfunc= + set thesaurus= endfunc func Test_edit_CTRL_U() -- cgit