mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -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:
@@ -2827,18 +2827,22 @@ parse_command_modifiers(exarg_T *eap, char_u **errormsg, int skip_only)
|
|||||||
|
|
||||||
case 't': if (checkforcmd(&p, "tab", 3))
|
case 't': if (checkforcmd(&p, "tab", 3))
|
||||||
{
|
{
|
||||||
long tabnr = get_address(eap, &eap->cmd, ADDR_TABS,
|
if (!skip_only)
|
||||||
eap->skip, skip_only, FALSE, 1);
|
|
||||||
if (tabnr == MAXLNUM)
|
|
||||||
cmdmod.tab = tabpage_index(curtab) + 1;
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
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);
|
if (tabnr < 0 || tabnr > LAST_TAB_NR)
|
||||||
return FAIL;
|
{
|
||||||
|
*errormsg = (char_u *)_(e_invrange);
|
||||||
|
return FAIL;
|
||||||
|
}
|
||||||
|
cmdmod.tab = tabnr + 1;
|
||||||
}
|
}
|
||||||
cmdmod.tab = tabnr + 1;
|
|
||||||
}
|
}
|
||||||
eap->cmd = p;
|
eap->cmd = p;
|
||||||
continue;
|
continue;
|
||||||
|
@@ -783,6 +783,20 @@ func Test_search_cmdline_incsearch_highlight_attr()
|
|||||||
bwipe!
|
bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_incsearch_cmdline_modifier()
|
||||||
|
if !exists('+incsearch')
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
call test_override("char_avail", 1)
|
||||||
|
new
|
||||||
|
call setline(1, ['foo'])
|
||||||
|
set incsearch
|
||||||
|
" Test that error E14 does not occur in parsing command modifier.
|
||||||
|
call feedkeys("V:tab", 'tx')
|
||||||
|
|
||||||
|
call Incsearch_cleanup()
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_incsearch_scrolling()
|
func Test_incsearch_scrolling()
|
||||||
if !CanRunVimInTerminal()
|
if !CanRunVimInTerminal()
|
||||||
return
|
return
|
||||||
|
@@ -799,6 +799,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
640,
|
||||||
/**/
|
/**/
|
||||||
639,
|
639,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user