File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- *terminal.txt* For Vim version 8.1. Last change: 2019 Feb 16
1+ *terminal.txt* For Vim version 8.1. Last change: 2019 Feb 22
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -80,6 +80,7 @@ Special in the terminal window: *CTRL-W_.* *CTRL-W_N*
8080 Also works with the = register to insert the result of
8181 evaluating an expression.
8282 CTRL-W CTRL-C ends the job, see below | t_CTRL-W_CTRL-C |
83+ CTRL-W gt go to next tabpage, same as `gt`
8384
8485See option 'termwinkey' for specifying another key instead of CTRL-W that
8586will work like CTRL-W . However, typing 'termwinkey' twice sends 'termwinkey'
Original file line number Diff line number Diff line change @@ -1571,19 +1571,31 @@ endfunc
15711571func Test_terminal_termwinkey ()
15721572 call assert_equal (1 , winnr (' $' ))
15731573 let thiswin = win_getid ()
1574+ tabnew
1575+ tabnext
15741576
15751577 let buf = Run_shell_in_terminal ({})
15761578 let termwin = bufwinid (buf )
15771579 set termwinkey = <C-L>
15781580 call feedkeys (" \<C-L> w" , ' tx' )
15791581 call assert_equal (thiswin, win_getid ())
15801582 call feedkeys (" \<C-W> w" , ' tx' )
1583+ call assert_equal (termwin, win_getid ())
1584+
1585+ let tnr = tabpagenr ()
1586+ call feedkeys (" \<C-L> gt" , " xt" )
1587+ call assert_notequal (tnr, tabpagenr ())
1588+ tabnext
1589+ call assert_equal (tnr, tabpagenr ())
1590+ call assert_equal (termwin, win_getid ())
15811591
15821592 let job = term_getjob (buf )
15831593 call feedkeys (" \<C-L>\<C-C> " , ' tx' )
15841594 call WaitForAssert ({- > assert_equal (" dead" , job_status (job))})
15851595
15861596 set termwinkey &
1597+ tabnext
1598+ tabclose
15871599endfunc
15881600
15891601func Test_terminal_out_err ()
Original file line number Diff line number Diff line change @@ -779,6 +779,8 @@ static char *(features[]) =
779779
780780static int included_patches [] =
781781{ /* Add new patch number below this line */
782+ /**/
783+ 972 ,
782784/**/
783785 971 ,
784786/**/
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ static win_T *win_alloc(win_T *after, int hidden);
6767static char * m_onlyone = N_ ("Already only one window" );
6868
6969/*
70- * all CTRL-W window commands are handled here, called from normal_cmd().
70+ * All CTRL-W window commands are handled here, called from normal_cmd().
7171 */
7272 void
7373do_window (
@@ -584,6 +584,10 @@ do_window(
584584 nchar = xchar ;
585585 goto wingotofile ;
586586#endif
587+ case 't' : // CTRL-W gt: go to next tab page
588+ goto_tabpage ((int )Prenum );
589+ break ;
590+
587591 default :
588592 beep_flush ();
589593 break ;
You can’t perform that action at this time.
0 commit comments