Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/ex_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -2515,8 +2515,11 @@ do_wqall(exarg_T *eap)
#ifdef FEAT_TERMINAL
if (exiting && !eap->forceit && term_job_running(buf->b_term))
{
no_write_message_buf(buf);
++error;
if (term_try_stop_job(buf) == FAIL)
{
no_write_message_buf(buf);
++error;
}
}
else
#endif
Expand Down
9 changes: 7 additions & 2 deletions src/testdir/test_terminal.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,7 @@ endfunc

" Run Vim, start a terminal in that Vim with the kill argument,
" :qall works.
func Run_terminal_qall_kill(line1, line2)
func Run_terminal_qall_kill_int(line1, line2, cmd)
" 1. Open a terminal window and wait for the prompt to appear
" 2. set kill using term_setkill()
" 3. make Vim exit, it will kill the shell
Expand All @@ -1346,7 +1346,7 @@ func Run_terminal_qall_kill(line1, line2)
\ 'endwhile',
\ a:line2,
\ 'au VimLeavePre * call writefile(["done"], "Xdone")',
\ 'qall',
\ a:cmd,
\ ]
if !RunVim([], after, '')
return
Expand All @@ -1355,6 +1355,11 @@ func Run_terminal_qall_kill(line1, line2)
call delete("Xdone")
endfunc

func Run_terminal_qall_kill(line1, line2)
call Run_terminal_qall_kill_int(a:line1, a:line2, 'qall')
call Run_terminal_qall_kill_int(a:line1, a:line2, 'wqall')
endfunc

" Run Vim in a terminal, then start a terminal in that Vim with a kill
" argument, check that :qall works.
func Test_terminal_qall_kill_arg()
Expand Down
Loading