summaryrefslogtreecommitdiff
path: root/src/window.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-08-10 19:21:15 +0200
committerBram Moolenaar <Bram@vim.org>2020-08-10 19:21:15 +0200
commit94f4ffa7704921a3634e56b878e6dc362bc3d508 (patch)
tree7eab30ba7523cb0c3261e6c4c0e77f12759937d2 /src/window.c
parent6e4cfffe809a894ea831fc8011527714481d2857 (diff)
downloadvim-git-94f4ffa7704921a3634e56b878e6dc362bc3d508.tar.gz
patch 8.2.1413: previous tab page not usable from an Ex commandv8.2.1413
Problem: Previous tab page not usable from an Ex command. Solution: Add the "#" argument for :tabnext et al. (Yegappan Lakshmanan, closes #6677)
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c
index d2e5c5c2a..75e049562 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3844,6 +3844,7 @@ free_tabpage(tabpage_T *tp)
win_new_tabpage(int after)
{
tabpage_T *tp = curtab;
+ tabpage_T *prev_tp = curtab;
tabpage_T *newtp;
int n;
@@ -3893,7 +3894,7 @@ win_new_tabpage(int after)
newtp->tp_topframe = topframe;
last_status(FALSE);
- lastused_tabpage = tp;
+ lastused_tabpage = prev_tp;
#if defined(FEAT_GUI)
// When 'guioptions' includes 'L' or 'R' may have to remove or add