summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-12-26 21:45:00 +0100
committerBram Moolenaar <Bram@vim.org>2018-12-26 21:45:00 +0100
commit548e5985734e4b216852205879daf9bfb00dbe5a (patch)
tree83fdfb078dd4e58bfcc6d4a2b6645b811615e4d2 /src
parent8cf734e024af56707a1165bcdfee42364695ec8e (diff)
patch 8.1.0640: get E14 while typing command :tab with 'incsearch' setv8.1.0640
Problem: Get E14 while typing command :tab with 'incsearch' set. Solution: Do not give an error when looking for the command. (Yasuhiro Higashi)
Diffstat (limited to 'src')
-rw-r--r--src/ex_docmd.c22
-rw-r--r--src/testdir/test_search.vim14
-rw-r--r--src/version.c2
3 files changed, 29 insertions, 9 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 67f505d960..aad818294e 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -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;
diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim
index 3c83dd197d..86df794b53 100644
--- a/src/testdir/test_search.vim
+++ b/src/testdir/test_search.vim
@@ -783,6 +783,20 @@ func Test_search_cmdline_incsearch_highlight_attr()
bwipe!
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()
if !CanRunVimInTerminal()
return
diff --git a/src/version.c b/src/version.c
index 30f2899624..10ba489e55 100644
--- a/src/version.c
+++ b/src/version.c
@@ -800,6 +800,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 640,
+/**/
639,
/**/
638,