diff src/window.c @ 21727:860cad58f557 v8.2.1413

patch 8.2.1413: previous tab page not usable from an Ex command Commit: https://github.com/vim/vim/commit/94f4ffa7704921a3634e56b878e6dc362bc3d508 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Aug 10 19:21:15 2020 +0200 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)
author Bram Moolenaar <Bram@vim.org>
date Mon, 10 Aug 2020 19:30:04 +0200
parents 5b0796787cb2
children 75513701ddd2
line wrap: on
line diff
--- 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