0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.1.0640: get E14 while typing command :tab with 'incsearch' set

Problem:    Get E14 while typing command :tab with 'incsearch' set.
Solution:   Do not give an error when looking for the command. (Yasuhiro
            Higashi)
This commit is contained in:
Bram Moolenaar
2018-12-26 21:45:00 +01:00
parent 8cf734e024
commit 548e598573
3 changed files with 29 additions and 9 deletions

View File

@@ -2827,18 +2827,22 @@ parse_command_modifiers(exarg_T *eap, char_u **errormsg, int skip_only)
case 't': if (checkforcmd(&p, "tab", 3))
{
long tabnr = get_address(eap, &eap->cmd, ADDR_TABS,
eap->skip, skip_only, FALSE, 1);
if (tabnr == MAXLNUM)
cmdmod.tab = tabpage_index(curtab) + 1;
else
if (!skip_only)
{
if (tabnr < 0 || tabnr > LAST_TAB_NR)
long tabnr = get_address(eap, &eap->cmd,
ADDR_TABS, eap->skip,
skip_only, FALSE, 1);
if (tabnr == MAXLNUM)
cmdmod.tab = tabpage_index(curtab) + 1;
else
{
*errormsg = (char_u *)_(e_invrange);
return FAIL;
if (tabnr < 0 || tabnr > LAST_TAB_NR)
{
*errormsg = (char_u *)_(e_invrange);
return FAIL;
}
cmdmod.tab = tabnr + 1;
}
cmdmod.tab = tabnr + 1;
}
eap->cmd = p;
continue;