Mercurial > vim
diff src/channel.c @ 13470:6faef782f50b v8.0.1609
patch 8.0.1609: shell commands in the GUI use a dumb terminal
commit https://github.com/vim/vim/commit/135682517bc378cfdb63fe3a6e3553935f69f6ce
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Mar 16 20:46:58 2018 +0100
patch 8.0.1609: shell commands in the GUI use a dumb terminal
Problem: Shell commands in the GUI use a dumb terminal.
Solution: Add the "!" flag to 'guioptions' to execute system commands in a
special terminal window. Only for Unix now.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 16 Mar 2018 21:00:08 +0100 |
parents | 33eea5ce5415 |
children | 97720d9a01d4 |
line wrap: on
line diff
--- a/src/channel.c +++ b/src/channel.c @@ -5383,11 +5383,13 @@ job_check_ended(void) /* * Create a job and return it. Implements job_start(). + * "argv_arg" is only for Unix. + * When "argv_arg" is NULL then "argvars" is used. * The returned job has a refcount of one. * Returns NULL when out of memory. */ job_T * -job_start(typval_T *argvars, jobopt_T *opt_arg) +job_start(typval_T *argvars, char **argv_arg, jobopt_T *opt_arg) { job_T *job; char_u *cmd = NULL; @@ -5474,6 +5476,13 @@ job_start(typval_T *argvars, jobopt_T *o job_set_options(job, &opt); +#ifdef USE_ARGV + if (argv_arg != NULL) + { + argv = argv_arg; + } + else +#endif if (argvars[0].v_type == VAR_STRING) { /* Command is a string. */ @@ -5551,7 +5560,8 @@ job_start(typval_T *argvars, jobopt_T *o theend: #ifdef USE_ARGV - vim_free(argv); + if (argv != argv_arg) + vim_free(argv); #else vim_free(ga.ga_data); #endif