summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-01-22 22:41:42 +0100
committerBram Moolenaar <Bram@vim.org>2019-01-22 22:41:42 +0100
commit82a12468bd023f5cdc5d27182bedef7881514643 (patch)
tree6c2fe1ff87b4116b8ba6b94d90782d16222fe514
parent0d17f0d1c09fa6db306336695ba646c21ea24909 (diff)
downloadvim-git-8.1.0794.tar.gz
patch 8.1.0794: white space before " -Ntabmove" causes problemsv8.1.0794
Problem: White space before " -Ntabmove" causes problems. Solution: Skip whitespace. (Ozaki Kiichi, closes #3841)
-rw-r--r--src/ex_docmd.c2
-rw-r--r--src/testdir/test_tabpage.vim8
-rw-r--r--src/version.c2
3 files changed, 11 insertions, 1 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 62f507c2b..f60bb3492 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -7588,7 +7588,7 @@ get_tabpage_arg(exarg_T *eap)
else
{
tab_number = eap->line2;
- if (!unaccept_arg0 && **eap->cmdlinep == '-')
+ if (!unaccept_arg0 && *skipwhite(*eap->cmdlinep) == '-')
{
--tab_number;
if (tab_number < unaccept_arg0)
diff --git a/src/testdir/test_tabpage.vim b/src/testdir/test_tabpage.vim
index add9b3d7c..48ac6eb2f 100644
--- a/src/testdir/test_tabpage.vim
+++ b/src/testdir/test_tabpage.vim
@@ -105,6 +105,14 @@ function Test_tabpage()
call assert_equal(4, tabpagenr())
7tabmove 5
call assert_equal(5, tabpagenr())
+ -tabmove
+ call assert_equal(4, tabpagenr())
+ +tabmove
+ call assert_equal(5, tabpagenr())
+ -2tabmove
+ call assert_equal(3, tabpagenr())
+ +3tabmove
+ call assert_equal(6, tabpagenr())
" The following are a no-op
norm! 2gt
diff --git a/src/version.c b/src/version.c
index cef2e4b5c..fc926196c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -792,6 +792,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 794,
+/**/
793,
/**/
792,