]> granicus.if.org Git - vim/commitdiff
patch 8.1.0794: white space before " -Ntabmove" causes problems v8.1.0794
authorBram Moolenaar <Bram@vim.org>
Tue, 22 Jan 2019 21:41:42 +0000 (22:41 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 22 Jan 2019 21:41:42 +0000 (22:41 +0100)
Problem:    White space before " -Ntabmove" causes problems.
Solution:   Skip whitespace. (Ozaki Kiichi, closes #3841)

src/ex_docmd.c
src/testdir/test_tabpage.vim
src/version.c

index 62f507c2b4aab3434cf73b8244e18ddf3033784e..f60bb3492cad69ede53c619145aeef8be27e2c0b 100644 (file)
@@ -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)
index add9b3d7cffa6fa373f20e6433586f82abaff754..48ac6eb2f26541bbfff5ffe3dea74293e6c82c8a 100644 (file)
@@ -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
index cef2e4b5c563d64ed639762ac203825775c3326b..fc926196c2c9e4cad271e0971b873b5fa64e5712 100644 (file)
@@ -791,6 +791,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    794,
 /**/
     793,
 /**/