diff src/normal.c @ 11957:bc0fee081e1e

patch 8.0.0858: can exit while a terminal is still running a job commit https://github.com/vim/vim/commit/eb44a68b42eda207a5bc4def9ea8fc4d38acb650 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 3 22:44:55 2017 +0200 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.
author Christian Brabandt <cb@256bit.org>
date Thu, 03 Aug 2017 22:45:04 +0200
parents 50ad151a7482
children 448635f73e09
line wrap: on
line diff
--- a/src/normal.c
+++ b/src/normal.c
@@ -6255,11 +6255,11 @@ nv_gotofile(cmdarg_T *cap)
     if (ptr != NULL)
     {
 	/* do autowrite if necessary */
-	if (curbufIsChanged() && curbuf->b_nwindows <= 1 && !P_HID(curbuf))
+	if (curbufIsChanged() && curbuf->b_nwindows <= 1 && !buf_hide(curbuf))
 	    (void)autowrite(curbuf, FALSE);
 	setpcmark();
 	if (do_ecmd(0, ptr, NULL, NULL, ECMD_LAST,
-				   P_HID(curbuf) ? ECMD_HIDE : 0, curwin) == OK
+				buf_hide(curbuf) ? ECMD_HIDE : 0, curwin) == OK
 		&& cap->nchar == 'F' && lnum >= 0)
 	{
 	    curwin->w_cursor.lnum = lnum;