1
0
forked from aniani/vim

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.
This commit is contained in:
Bram Moolenaar
2018-06-12 20:25:52 +02:00
parent d7a137fb0d
commit 493359eb3b
8 changed files with 66 additions and 33 deletions

View File

@@ -5525,7 +5525,11 @@ job_check_ended(void)
* Returns NULL when out of memory.
*/
job_T *
job_start(typval_T *argvars, char **argv_arg, jobopt_T *opt_arg)
job_start(
typval_T *argvars,
char **argv_arg,
jobopt_T *opt_arg,
int is_terminal UNUSED)
{
job_T *job;
char_u *cmd = NULL;
@@ -5679,7 +5683,7 @@ job_start(typval_T *argvars, char **argv_arg, jobopt_T *opt_arg)
ch_log(NULL, "Starting job: %s", (char *)ga.ga_data);
ga_clear(&ga);
}
mch_job_start(argv, job, &opt);
mch_job_start(argv, job, &opt, is_terminal);
#else
ch_log(NULL, "Starting job: %s", (char *)cmd);
mch_job_start((char *)cmd, job, &opt);