mirror of
https://github.com/neovim/neovim.git
synced 2026-01-05 02:47:28 +10:00
vim-patch:9.1.1979: :helpclose allows range and counts (#36966)
Problem: :helpclose incorrectly accepts a range and a count.
Solution: Remove EX_COUNT and EX_RANGE from the command definition.
(Doug Kearns)
closes: vim/vim#18917
4c141bae3b
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
@@ -1106,8 +1106,8 @@ M.cmds = {
|
||||
},
|
||||
{
|
||||
command = 'helpclose',
|
||||
flags = bit.bor(RANGE, COUNT, TRLBAR),
|
||||
addr_type = 'ADDR_OTHER',
|
||||
flags = TRLBAR,
|
||||
addr_type = 'ADDR_NONE',
|
||||
func = 'ex_helpclose',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -74,6 +74,13 @@ func Test_help_errors()
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
func Test_helpclose_errors()
|
||||
call assert_fails('42helpclose', 'E481:')
|
||||
call assert_fails('helpclose 42', 'E488:')
|
||||
call assert_fails('helpclose foo', 'E488:')
|
||||
call assert_fails('helpclose!', 'E477:')
|
||||
endfunc
|
||||
|
||||
func Test_help_expr()
|
||||
help expr-!~?
|
||||
call assert_equal('vimeval.txt', expand('%:t'))
|
||||
|
||||
Reference in New Issue
Block a user