mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.1413: previous tab page not usable from an Ex command
Problem: Previous tab page not usable from an Ex command. Solution: Add the "#" argument for :tabnext et al. (Yegappan Lakshmanan, closes #6677)
This commit is contained in:
@@ -5412,6 +5412,15 @@ get_tabpage_arg(exarg_T *eap)
|
||||
{
|
||||
if (STRCMP(p, "$") == 0)
|
||||
tab_number = LAST_TAB_NR;
|
||||
else if (STRCMP(p, "#") == 0)
|
||||
if (valid_tabpage(lastused_tabpage))
|
||||
tab_number = tabpage_index(lastused_tabpage);
|
||||
else
|
||||
{
|
||||
eap->errmsg = ex_errmsg(e_invargval, eap->arg);
|
||||
tab_number = 0;
|
||||
goto theend;
|
||||
}
|
||||
else if (p == p_save || *p_save == '-' || *p != NUL
|
||||
|| tab_number > LAST_TAB_NR)
|
||||
{
|
||||
|
Reference in New Issue
Block a user