mirror of
https://github.com/vim/vim.git
synced 2026-02-01 11:34:23 +01:00
patch 9.1.1979: :helpclose allows range and counts
Problem: :helpclose incorrectly accepts a range and a count.
Solution: Remove EX_COUNT and EX_RANGE from the command definition.
(Doug Kearns)
closes: #18917
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
a2b45646ab
commit
4c141bae3b
@@ -693,8 +693,8 @@ EXCMD(CMD_help, "help", ex_help,
|
||||
EX_BANG|EX_EXTRA|EX_NOTRLCOM,
|
||||
ADDR_NONE),
|
||||
EXCMD(CMD_helpclose, "helpclose", ex_helpclose,
|
||||
EX_RANGE|EX_COUNT|EX_TRLBAR,
|
||||
ADDR_OTHER),
|
||||
EX_TRLBAR,
|
||||
ADDR_NONE),
|
||||
EXCMD(CMD_helpfind, "helpfind", ex_helpfind,
|
||||
EX_EXTRA|EX_NOTRLCOM,
|
||||
ADDR_NONE),
|
||||
|
||||
@@ -58,6 +58,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('eval.txt', expand('%:t'))
|
||||
|
||||
@@ -734,6 +734,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1979,
|
||||
/**/
|
||||
1978,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user