patch 8.0.1525: using :wqa exits even if a job runs in a terminal window

Problem:    Using :wqa exits even if a job runs in a terminal window. (Jason
            Felice)
Solution:   Check if a terminal has a running job. (closes #2654)
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index a4d6221..e05215a 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -3428,6 +3428,14 @@
 
     FOR_ALL_BUFFERS(buf)
     {
+#ifdef FEAT_TERMINAL
+	if (exiting && term_job_running(buf->b_term))
+	{
+	    no_write_message_nobang(buf);
+	    ++error;
+	}
+	else
+#endif
 	if (bufIsChanged(buf) && !bt_dontwrite(buf))
 	{
 	    /*