summaryrefslogtreecommitdiff
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-08-03 22:44:55 +0200
committerBram Moolenaar <Bram@vim.org>2017-08-03 22:44:55 +0200
commiteb44a68b42eda207a5bc4def9ea8fc4d38acb650 (patch)
tree6fae22aba3c4f1eaad8e6d5e4d74df201c78a65e /src/ex_cmds.c
parent620d064b0b0bca2268574abdec2d8eac3384cfdf (diff)
downloadvim-eb44a68b42eda207a5bc4def9ea8fc4d38acb650.zip
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.
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 6ec3ded90..61c85a917 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -3561,7 +3561,7 @@ getfile(
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 defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
@@ -3590,7 +3590,7 @@ getfile(
retval = GETFILE_SAME_FILE; /* 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 = GETFILE_OPEN_OTHER; /* opened another file */
else
@@ -8401,7 +8401,7 @@ ex_drop(exarg_T *eap)
* Skip the check if the 'hidden' option is set, as in this case the
* buffer won't be lost.
*/
- if (!P_HID(curbuf))
+ if (!buf_hide(curbuf))
{
# ifdef FEAT_WINDOWS
++emsg_off;