mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
vim-patch:8.0.0663: unexpected error with 'verbose' (#8692)
Problem: Giving an error message only when 'verbose' set is unexpected.
Solution: Give a warning message instead.
f8be461d02
This commit is contained in:

committed by
Justin M. Keyes

parent
2bfabd5bf8
commit
336ce02a6e
@@ -8560,6 +8560,9 @@ See |:verbose-cmd| for more information.
|
||||
not used an error message is given. When [!] is used,
|
||||
an existing function is silently replaced. Unless it
|
||||
is currently being executed, that is an error.
|
||||
NOTE: Use ! wisely. If used without care it can cause
|
||||
an existing function to be replaced unexpectedly,
|
||||
which is hard to debug.
|
||||
|
||||
For the {arguments} see |function-argument|.
|
||||
|
||||
|
@@ -1238,10 +1238,12 @@ func Test_endfunction_trailing()
|
||||
|
||||
set verbose=1
|
||||
exe "func Xtest()\necho 'hello'\nendfunc \" garbage"
|
||||
call assert_notmatch('W22:', split(execute('1messages'), "\n")[0])
|
||||
call assert_true(exists('*Xtest'))
|
||||
delfunc Xtest
|
||||
|
||||
call assert_fails("func Xtest()\necho 'hello'\nendfunc garbage", 'E946')
|
||||
exe "func Xtest()\necho 'hello'\nendfunc garbage"
|
||||
call assert_match('W22:', split(execute('1messages'), "\n")[0])
|
||||
call assert_true(exists('*Xtest'))
|
||||
delfunc Xtest
|
||||
set verbose=0
|
||||
|
Reference in New Issue
Block a user