0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

patch 8.2.1401: cannot jump to the last used tabpage

Problem:    Cannot jump to the last used tabpage.
Solution:   Add g<Tab> and tabpagnr('#'). (Yegappan Lakshmanan, closes #6661,
            neovim #11626)
This commit is contained in:
Bram Moolenaar
2020-08-09 14:04:42 +02:00
parent 730b248339
commit 62a232506d
10 changed files with 107 additions and 5 deletions

View File

@@ -616,6 +616,9 @@ f_tabpagenr(typval_T *argvars UNUSED, typval_T *rettv)
{
if (STRCMP(arg, "$") == 0)
nr = tabpage_index(NULL) - 1;
else if (STRCMP(arg, "#") == 0)
nr = valid_tabpage(lastused_tabpage) ?
tabpage_index(lastused_tabpage) : 0;
else
semsg(_(e_invexpr2), arg);
}