Hello itchyny,
2015/3/10(Tue) 12:59:23 UTC+9 itchyny:
> Hello, all.
> I think that there are some problems for :tabmove. Firstly, see the document
> (:h :tabmove).
>
> :tabm[ove] [N] *:tabm*
> *:tabmove*
> :[N]tabm[ove]
> Move the current tab page to after tab page N. Use zero to
> make the current tab page the first one. Without N the tab
> page is made the last one. >
> :-tabmove " move the tab page to the left
> :tabmove " move the tab page to the right
> :.tabmove " as above
> :+tabmove " as above
> :0tabmove " move the tab page to the beginning of the tab
> " list
> :$tabmove " move the tab page to the end of the tab list
>
> Let me explain some problems related to this command.
>
> 1. :tabmove
> The :tabmove with no argument and with no range moves the tab page to the
> last place.
> The help says that `Without N the tab page is made the last one` while it says
> `:tabmove " move the tab page to the right `. I think that this comment is
> mistaken.
>
> 2. :-tabmove
> Within the latest Vim, the command :-tabmove does not move the tab page. The
> help says
> that `:-tabmove " move the tab page to the left`. Which behaviour is
> correct?
>
> 3. :+tabmove
> Within the latest Vim, the command :+tabmove moves the current tab page to
> the right position
> of the right tab page (doubly right position). The help says `:+tabmove " as
> above`, which,
> I think, means that the same behaviour of `:.tabmove`. This is inconsistent
> with the actual behaviour.
>
> Basically I do not think that the comments of examples in the help are
> correct. I also
> noticed that there are no tests for `:.tabmove`, `:+tabmove`, `:-tabmove` and
> `:tabmove` in testdir/test62.in.
> Hope it fixed.
>
> Thanks.
Thank for reporting!
I fixed on the behavior of the document.
Please check attached patch.
PS
test is not added..
Best regards,
Hirohito Higashi (a.k.a h_east)
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff -r 03e6a768a028 src/ex_docmd.c
--- a/src/ex_docmd.c Sun Mar 08 14:48:49 2015 +0100
+++ b/src/ex_docmd.c Tue Mar 10 16:06:29 2015 +0900
@@ -8145,7 +8145,7 @@
ex_tabmove(eap)
exarg_T *eap;
{
- int tab_number = 9999;
+ int tab_number;
if (eap->arg && *eap->arg != NUL)
{
@@ -8178,7 +8178,13 @@
tab_number = tab_number * relative + tabpage_index(curtab) - 1;;
}
else if (eap->addr_count != 0)
+ {
tab_number = eap->line2;
+ if (**eap->cmdlinep != '.')
+ --tab_number;
+ }
+ else
+ tab_number = CURRENT_TAB_NR;
tabpage_move(tab_number);
}