mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
patch 9.1.0205: Cannot use modifiers before :-Ntabmove
Problem: Cannot use modifiers before :-Ntabmove. Solution: Check backwards from the command instead of checking from the start of the command line. Slightly adjust docs to make them more consistent (zeertzjq). closes: #14289 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
6dcf59b89f
commit
076faac537
@ -6317,11 +6317,19 @@ get_tabpage_arg(exarg_T *eap)
|
||||
else
|
||||
{
|
||||
tab_number = eap->line2;
|
||||
if (!unaccept_arg0 && *skipwhite(*eap->cmdlinep) == '-')
|
||||
if (!unaccept_arg0)
|
||||
{
|
||||
--tab_number;
|
||||
if (tab_number < unaccept_arg0)
|
||||
eap->errmsg = _(e_invalid_range);
|
||||
char_u *cmdp = eap->cmd;
|
||||
|
||||
while (--cmdp > *eap->cmdlinep
|
||||
&& (VIM_ISWHITE(*cmdp) || VIM_ISDIGIT(*cmdp)))
|
||||
;
|
||||
if (*cmdp == '-')
|
||||
{
|
||||
--tab_number;
|
||||
if (tab_number < unaccept_arg0)
|
||||
eap->errmsg = _(e_invalid_range);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user