File tree 2 files changed +25
-0
lines changed
2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -885,3 +885,26 @@ func Test_terminal_qall_kill_func()
885
885
" close the terminal window where Vim was running
886
886
quit
887
887
endfunc
888
+
889
+ " Run Vim in a terminal, then start a terminal in that Vim without a kill
890
+ " argument, check that :confirm qall works.
891
+ func Test_terminal_qall_prompt ()
892
+ if ! CanRunVimInTerminal ()
893
+ return
894
+ endif
895
+ let buf = RunVimInTerminal (' ' , {})
896
+
897
+ " Open a terminal window and wait for the prompt to appear
898
+ call term_sendkeys (buf , " :term\<CR> " )
899
+ call WaitFor ({- > term_getline (buf , 10 ) = ~ ' \[running]' })
900
+ call WaitFor ({- > term_getline (buf , 1 ) !~ ' ^\s*$' })
901
+
902
+ " make Vim exit, it will prompt to kill the shell
903
+ call term_sendkeys (buf , " \<C-W> :confirm qall\<CR> " )
904
+ call WaitFor ({- > term_getline (buf , 20 ) = ~ ' ancel:' })
905
+ call term_sendkeys (buf , " y" )
906
+ call WaitFor ({- > term_getstatus (buf ) == " finished" })
907
+
908
+ " close the terminal window where Vim was running
909
+ quit
910
+ endfunc
Original file line number Diff line number Diff line change @@ -766,6 +766,8 @@ static char *(features[]) =
766
766
767
767
static int included_patches [] =
768
768
{ /* Add new patch number below this line */
769
+ /**/
770
+ 1594 ,
769
771
/**/
770
772
1593 ,
771
773
/**/
You can’t perform that action at this time.
0 commit comments