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:
@@ -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)
|
||||||
|
@@ -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
|
||||||
|
@@ -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,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user