Mercurial > vim
diff src/terminal.c @ 12907:32531a3eab1f v8.0.1330
patch 8.0.1330: MS-Windows: job in terminal can't get back to Vim
commit https://github.com/vim/vim/commit/52dbb5ea7fde4a77178bc59e2383ca40df503812
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Nov 21 18:11:27 2017 +0100
patch 8.0.1330: MS-Windows: job in terminal can't get back to Vim
Problem: MS-Windows: job in terminal can't get back to Vim.
Solution: set VIM_SERVERNAME in the environment. (Yasuhiro Matsumoto, closes
#2360)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 21 Nov 2017 18:15:06 +0100 |
parents | 411a30bd7e8a |
children | c5bccd50100e |
line wrap: on
line diff
--- a/src/terminal.c +++ b/src/terminal.c @@ -3424,12 +3424,10 @@ term_and_job_init( return FAIL; if (opt->jo_cwd != NULL) cwd_wchar = enc_to_utf16(opt->jo_cwd, NULL); - if (opt->jo_env != NULL) - { - ga_init2(&ga_env, (int)sizeof(char*), 20); - win32_build_env(opt->jo_env, &ga_env); - env_wchar = ga_env.ga_data; - } + + ga_init2(&ga_env, (int)sizeof(char*), 20); + win32_build_env(opt->jo_env, &ga_env, TRUE); + env_wchar = ga_env.ga_data; job = job_alloc(); if (job == NULL) @@ -3531,8 +3529,7 @@ term_and_job_init( failed: if (argvar->v_type == VAR_LIST) vim_free(ga_cmd.ga_data); - if (opt->jo_env != NULL) - vim_free(ga_env.ga_data); + vim_free(ga_env.ga_data); vim_free(cmd_wchar); vim_free(cwd_wchar); if (spawn_config != NULL)