summaryrefslogtreecommitdiffstats
path: root/src/channel.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-03-16 20:46:58 +0100
committerBram Moolenaar <Bram@vim.org>2018-03-16 20:46:58 +0100
commit135682517bc378cfdb63fe3a6e3553935f69f6ce (patch)
tree5fa4aaca6a81a5f0b88c1e1da730f74e24acde42 /src/channel.c
parent43cb6262141c0a0853680bd8d0433e04db3bf182 (diff)
patch 8.0.1609: shell commands in the GUI use a dumb terminalv8.0.1609
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.
Diffstat (limited to 'src/channel.c')
-rw-r--r--src/channel.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/channel.c b/src/channel.c
index 1f41445c62..3b71472fdc 100644
--- 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 *opt_arg)
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 *opt_arg)
theend:
#ifdef USE_ARGV
- vim_free(argv);
+ if (argv != argv_arg)
+ vim_free(argv);
#else
vim_free(ga.ga_data);
#endif