1
0
forked from aniani/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.
This commit is contained in:
Bram Moolenaar
2021-10-17 14:13:09 +01:00
parent 9d4b8caf9e
commit f4d8b76d30
9 changed files with 109 additions and 51 deletions

View File

@@ -920,16 +920,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()