vim-patch:8.0.0858: can exit while a terminal is still running a job

Problem:    Can exit while a terminal is still running a job.
Solution:   Consider a buffer with a running job like a changed file.

eb44a68b42
This commit is contained in:
Justin M. Keyes
2018-02-11 20:56:55 +01:00
parent 3ffeceb851
commit 2929dbf223
7 changed files with 28 additions and 31 deletions

View File

@@ -2015,7 +2015,7 @@ int getfile(int fnum, char_u *ffname, char_u *sfname, int setpm, linenr_T lnum,
if (other)
++no_wait_return; /* don't wait for autowrite message */
if (other && !forceit && curbuf->b_nwindows == 1 && !P_HID(curbuf)
if (other && !forceit && curbuf->b_nwindows == 1 && !buf_hide(curbuf)
&& curbufIsChanged() && autowrite(curbuf, forceit) == FAIL) {
if (p_confirm && p_write)
dialog_changed(curbuf, FALSE);
@@ -2038,7 +2038,7 @@ int getfile(int fnum, char_u *ffname, char_u *sfname, int setpm, linenr_T lnum,
beginline(BL_SOL | BL_FIX);
retval = 0; /* it's in the same file */
} else if (do_ecmd(fnum, ffname, sfname, NULL, lnum,
(P_HID(curbuf) ? ECMD_HIDE : 0) + (forceit ? ECMD_FORCEIT : 0),
(buf_hide(curbuf) ? ECMD_HIDE : 0) + (forceit ? ECMD_FORCEIT : 0),
curwin) == OK)
retval = -1; /* opened another file */
else