summaryrefslogtreecommitdiff
path: root/src/evalwindow.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-08-09 14:04:42 +0200
committerBram Moolenaar <Bram@vim.org>2020-08-09 14:04:42 +0200
commit62a232506d06f6d1b3b7271801c907d6294dfe84 (patch)
treed95d049e9676ef5b8a63ca9096401ca52dc8b90d /src/evalwindow.c
parent730b24833952f0f4a9a17b7815b0d9f87c609eb8 (diff)
downloadvim-git-62a232506d06f6d1b3b7271801c907d6294dfe84.tar.gz
patch 8.2.1401: cannot jump to the last used tabpagev8.2.1401
Problem: Cannot jump to the last used tabpage. Solution: Add g<Tab> and tabpagnr('#'). (Yegappan Lakshmanan, closes #6661, neovim #11626)
Diffstat (limited to 'src/evalwindow.c')
-rw-r--r--src/evalwindow.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/evalwindow.c b/src/evalwindow.c
index 0b3052c24..b50776d74 100644
--- a/src/evalwindow.c
+++ b/src/evalwindow.c
@@ -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);
}