aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-02-11 20:56:55 +0100
committerJustin M. Keyes <justinkz@gmail.com>2018-02-11 22:40:12 +0100
commit2929dbf2233f05f58e094ce4a80fb1320ac6d336 (patch)
tree19725654d59522b5735687134483c0237ab1eaee /src/nvim/ex_cmds.c
parent3ffeceb851b135a1eb77287af12bb6fbfaf8d175 (diff)
downloadrneovim-2929dbf2233f05f58e094ce4a80fb1320ac6d336.tar.gz
rneovim-2929dbf2233f05f58e094ce4a80fb1320ac6d336.tar.bz2
rneovim-2929dbf2233f05f58e094ce4a80fb1320ac6d336.zip
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. https://github.com/vim/vim/commit/eb44a68b42eda207a5bc4def9ea8fc4d38acb650
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 9cfcecf8ad..629125fa44 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -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