patch 8.0.0936: mode() returns wrong value for a terminal window

Problem:    Mode() returns wrong value for a terminal window.
Solution:   Return 't' when typed keys go to a job.
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 3d657f7..2be7fe1 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -7849,6 +7849,10 @@
 	buf[0] = 'x';
 	buf[1] = '!';
     }
+#ifdef FEAT_TERMINAL
+    else if (term_use_loop())
+	buf[0] = 't';
+#endif
     else if (VIsual_active)
     {
 	if (VIsual_select)