Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
13469:e9121e612cbc | 13470:6faef782f50b |
---|---|
5381 } | 5381 } |
5382 } | 5382 } |
5383 | 5383 |
5384 /* | 5384 /* |
5385 * Create a job and return it. Implements job_start(). | 5385 * Create a job and return it. Implements job_start(). |
5386 * "argv_arg" is only for Unix. | |
5387 * When "argv_arg" is NULL then "argvars" is used. | |
5386 * The returned job has a refcount of one. | 5388 * The returned job has a refcount of one. |
5387 * Returns NULL when out of memory. | 5389 * Returns NULL when out of memory. |
5388 */ | 5390 */ |
5389 job_T * | 5391 job_T * |
5390 job_start(typval_T *argvars, jobopt_T *opt_arg) | 5392 job_start(typval_T *argvars, char **argv_arg, jobopt_T *opt_arg) |
5391 { | 5393 { |
5392 job_T *job; | 5394 job_T *job; |
5393 char_u *cmd = NULL; | 5395 char_u *cmd = NULL; |
5394 #if defined(UNIX) | 5396 #if defined(UNIX) |
5395 # define USE_ARGV | 5397 # define USE_ARGV |
5472 job->jv_in_buf = buf; | 5474 job->jv_in_buf = buf; |
5473 } | 5475 } |
5474 | 5476 |
5475 job_set_options(job, &opt); | 5477 job_set_options(job, &opt); |
5476 | 5478 |
5479 #ifdef USE_ARGV | |
5480 if (argv_arg != NULL) | |
5481 { | |
5482 argv = argv_arg; | |
5483 } | |
5484 else | |
5485 #endif | |
5477 if (argvars[0].v_type == VAR_STRING) | 5486 if (argvars[0].v_type == VAR_STRING) |
5478 { | 5487 { |
5479 /* Command is a string. */ | 5488 /* Command is a string. */ |
5480 cmd = argvars[0].vval.v_string; | 5489 cmd = argvars[0].vval.v_string; |
5481 if (cmd == NULL || *cmd == NUL) | 5490 if (cmd == NULL || *cmd == NUL) |
5549 if (job->jv_channel != NULL) | 5558 if (job->jv_channel != NULL) |
5550 channel_write_in(job->jv_channel); | 5559 channel_write_in(job->jv_channel); |
5551 | 5560 |
5552 theend: | 5561 theend: |
5553 #ifdef USE_ARGV | 5562 #ifdef USE_ARGV |
5554 vim_free(argv); | 5563 if (argv != argv_arg) |
5564 vim_free(argv); | |
5555 #else | 5565 #else |
5556 vim_free(ga.ga_data); | 5566 vim_free(ga.ga_data); |
5557 #endif | 5567 #endif |
5558 free_job_options(&opt); | 5568 free_job_options(&opt); |
5559 return job; | 5569 return job; |