patch 8.1.0050: $VIM_TERMINAL is also set when not in a terminal window
Problem: $VIM_TERMINAL is also set when not in a terminal window.
Solution: Pass a flag to indicate whether the job runs in a terminal.
diff --git a/src/terminal.c b/src/terminal.c
index 275a5a7..9b7bc03 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -5769,7 +5769,7 @@
#endif
/* This may change a string in "argvar". */
- term->tl_job = job_start(argvar, argv, opt);
+ term->tl_job = job_start(argvar, argv, opt, TRUE);
if (term->tl_job != NULL)
++term->tl_job->jv_refcount;