Skip to content

Commit 435acdb

Browse files
committed
patch 8.0.1594: :conform qall not tested with active terminal window
Problem: :conform qall not tested with active terminal window. Solution: Add a test.
1 parent 25cdd9c commit 435acdb

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

Diff for: src/testdir/test_terminal.vim

+23
Original file line numberDiff line numberDiff line change
@@ -885,3 +885,26 @@ func Test_terminal_qall_kill_func()
885885
" close the terminal window where Vim was running
886886
quit
887887
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

Diff for: src/version.c

+2
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,8 @@ static char *(features[]) =
766766

767767
static int included_patches[] =
768768
{ /* Add new patch number below this line */
769+
/**/
770+
1594,
769771
/**/
770772
1593,
771773
/**/

0 commit comments

Comments
 (0)