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.
diff --git a/src/window.c b/src/window.c
index 948303c..3110098 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3379,7 +3379,8 @@
 #endif
 		    continue;
 	    }
-	    win_close(wp, !P_HID(wp->w_buffer) && !bufIsChanged(wp->w_buffer));
+	    win_close(wp, !buf_hide(wp->w_buffer)
+					       && !bufIsChanged(wp->w_buffer));
 	}
     }