mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +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
@@ -5202,9 +5202,9 @@ line({expr}) The result is a Number, which is the line number of the file
|
|||||||
This autocommand jumps to the last known position in a file
|
This autocommand jumps to the last known position in a file
|
||||||
just after opening it, if the '" mark is set: >
|
just after opening it, if the '" mark is set: >
|
||||||
:au BufReadPost *
|
:au BufReadPost *
|
||||||
\ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit'
|
\ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit'
|
||||||
\ | exe "normal! g`\""
|
\ | exe "normal! g`\""
|
||||||
\ | endif
|
\ | endif
|
||||||
|
|
||||||
line2byte({lnum}) *line2byte()*
|
line2byte({lnum}) *line2byte()*
|
||||||
Return the byte count from the start of the buffer for line
|
Return the byte count from the start of the buffer for line
|
||||||
@@ -5671,7 +5671,7 @@ min({expr}) Return the minimum value of all items in {expr}.
|
|||||||
it returns the minimum of all values in the dictionary.
|
it returns the minimum of all values in the dictionary.
|
||||||
If {expr} is neither a list nor a dictionary, or one of the
|
If {expr} is neither a list nor a dictionary, or one of the
|
||||||
items in {expr} cannot be used as a Number this results in
|
items in {expr} cannot be used as a Number this results in
|
||||||
an error. An empty |List| or |Dictionary| results in zero.
|
an error. An empty |List| or |Dictionary| results in zero.
|
||||||
|
|
||||||
*mkdir()* *E739*
|
*mkdir()* *E739*
|
||||||
mkdir({name} [, {path} [, {prot}]])
|
mkdir({name} [, {path} [, {prot}]])
|
||||||
@@ -8253,8 +8253,8 @@ winwidth({nr}) *winwidth()*
|
|||||||
:if winwidth(0) <= 50
|
:if winwidth(0) <= 50
|
||||||
: exe "normal 50\<C-W>|"
|
: exe "normal 50\<C-W>|"
|
||||||
:endif
|
:endif
|
||||||
< For getting the terminal or screen size, see the 'columns'
|
< For getting the terminal or screen size, see the 'columns'
|
||||||
option.
|
option.
|
||||||
|
|
||||||
|
|
||||||
wordcount() *wordcount()*
|
wordcount() *wordcount()*
|
||||||
@@ -8272,11 +8272,11 @@ wordcount() *wordcount()*
|
|||||||
cursor_words Number of words before cursor position
|
cursor_words Number of words before cursor position
|
||||||
(not in Visual mode)
|
(not in Visual mode)
|
||||||
visual_bytes Number of bytes visually selected
|
visual_bytes Number of bytes visually selected
|
||||||
(only in Visual mode)
|
(only in Visual mode)
|
||||||
visual_chars Number of chars visually selected
|
visual_chars Number of chars visually selected
|
||||||
(only in Visual mode)
|
(only in Visual mode)
|
||||||
visual_words Number of chars visually selected
|
visual_words Number of chars visually selected
|
||||||
(only in Visual mode)
|
(only in Visual mode)
|
||||||
|
|
||||||
|
|
||||||
*writefile()*
|
*writefile()*
|
||||||
@@ -8560,6 +8560,9 @@ See |:verbose-cmd| for more information.
|
|||||||
not used an error message is given. When [!] is used,
|
not used an error message is given. When [!] is used,
|
||||||
an existing function is silently replaced. Unless it
|
an existing function is silently replaced. Unless it
|
||||||
is currently being executed, that is an error.
|
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|.
|
For the {arguments} see |function-argument|.
|
||||||
|
|
||||||
|
@@ -1238,10 +1238,12 @@ func Test_endfunction_trailing()
|
|||||||
|
|
||||||
set verbose=1
|
set verbose=1
|
||||||
exe "func Xtest()\necho 'hello'\nendfunc \" garbage"
|
exe "func Xtest()\necho 'hello'\nendfunc \" garbage"
|
||||||
|
call assert_notmatch('W22:', split(execute('1messages'), "\n")[0])
|
||||||
call assert_true(exists('*Xtest'))
|
call assert_true(exists('*Xtest'))
|
||||||
delfunc 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'))
|
call assert_true(exists('*Xtest'))
|
||||||
delfunc Xtest
|
delfunc Xtest
|
||||||
set verbose=0
|
set verbose=0
|
||||||
|
Reference in New Issue
Block a user