mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-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)
548e598573
This commit is contained in:
parent
4327fe8da5
commit
cc049a5612
@ -2228,17 +2228,19 @@ int parse_command_modifiers(exarg_T *eap, char_u **errormsg, bool skip_only)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
case 't': if (checkforcmd(&p, "tab", 3)) {
|
case 't': if (checkforcmd(&p, "tab", 3)) {
|
||||||
long tabnr = get_address(
|
if (!skip_only) {
|
||||||
eap, &eap->cmd, ADDR_TABS, eap->skip, skip_only, false, 1);
|
long tabnr = get_address(
|
||||||
|
eap, &eap->cmd, ADDR_TABS, eap->skip, skip_only, false, 1);
|
||||||
|
|
||||||
if (tabnr == MAXLNUM) {
|
if (tabnr == MAXLNUM) {
|
||||||
cmdmod.tab = tabpage_index(curtab) + 1;
|
cmdmod.tab = tabpage_index(curtab) + 1;
|
||||||
} else {
|
} else {
|
||||||
if (tabnr < 0 || tabnr > LAST_TAB_NR) {
|
if (tabnr < 0 || tabnr > LAST_TAB_NR) {
|
||||||
*errormsg = (char_u *)_(e_invrange);
|
*errormsg = (char_u *)_(e_invrange);
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
cmdmod.tab = tabnr + 1;
|
||||||
}
|
}
|
||||||
cmdmod.tab = tabnr + 1;
|
|
||||||
}
|
}
|
||||||
eap->cmd = p;
|
eap->cmd = p;
|
||||||
continue;
|
continue;
|
||||||
|
@ -861,6 +861,21 @@ func Test_incsearch_with_change()
|
|||||||
call delete('Xis_change_script')
|
call delete('Xis_change_script')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_incsearch_cmdline_modifier()
|
||||||
|
throw 'skipped: Nvim does not support test_override()'
|
||||||
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user