0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.1.0794: white space before " -Ntabmove" causes problems

Problem:    White space before " -Ntabmove" causes problems.
Solution:   Skip whitespace. (Ozaki Kiichi, closes #3841)
This commit is contained in:
Bram Moolenaar
2019-01-22 22:41:42 +01:00
parent 0d17f0d1c0
commit 82a12468bd
3 changed files with 11 additions and 1 deletions

View File

@@ -7588,7 +7588,7 @@ get_tabpage_arg(exarg_T *eap)
else else
{ {
tab_number = eap->line2; tab_number = eap->line2;
if (!unaccept_arg0 && **eap->cmdlinep == '-') if (!unaccept_arg0 && *skipwhite(*eap->cmdlinep) == '-')
{ {
--tab_number; --tab_number;
if (tab_number < unaccept_arg0) if (tab_number < unaccept_arg0)

View File

@@ -105,6 +105,14 @@ function Test_tabpage()
call assert_equal(4, tabpagenr()) call assert_equal(4, tabpagenr())
7tabmove 5 7tabmove 5
call assert_equal(5, tabpagenr()) 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 " The following are a no-op
norm! 2gt norm! 2gt

View File

@@ -791,6 +791,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 */
/**/
794,
/**/ /**/
793, 793,
/**/ /**/