diff src/window.c @ 15937:c38fb03a6055 v8.1.0974

patch 8.1.0974: cannot switch from terminal window to previous tabpage commit https://github.com/vim/vim/commit/882d02eeb571a13a502fe82a04c9eaffa630c294 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Feb 22 17:56:43 2019 +0100 patch 8.1.0974: cannot switch from terminal window to previous tabpage Problem: Cannot switch from terminal window to previous tabpage. Solution: Make CTRL-W gT move to previous tabpage.
author Bram Moolenaar <Bram@vim.org>
date Fri, 22 Feb 2019 18:00:05 +0100
parents b2423b31266f
children 7fbdceabad64
line wrap: on
line diff
--- a/src/window.c
+++ b/src/window.c
@@ -87,10 +87,7 @@ do_window(
 #endif
     char_u	cbuf[40];
 
-    if (Prenum == 0)
-	Prenum1 = 1;
-    else
-	Prenum1 = Prenum;
+    Prenum1 = Prenum == 0 ? 1 : Prenum;
 
 #ifdef FEAT_CMDWIN
 # define CHECK_CMDWIN \
@@ -588,6 +585,10 @@ wingotofile:
 			goto_tabpage((int)Prenum);
 			break;
 
+		    case 'T':	    // CTRL-W gT: go to previous tab page
+			goto_tabpage(-(int)Prenum1);
+			break;
+
 		    default:
 			beep_flush();
 			break;