diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-08-12 16:01:04 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-08-12 16:01:04 +0200 |
commit | 37c45835945fc433a3bb85fcfc0b4fd58b1ee0e7 (patch) | |
tree | 7269dcfec93d8c7187f915c79635cf7e35ee8269 /src/channel.c | |
parent | 7eedd4398aee195212bd06004d3533ca24c0823c (diff) | |
download | vim-git-37c45835945fc433a3bb85fcfc0b4fd58b1ee0e7.tar.gz |
patch 8.0.0916: cannot specify properties of window for terminal openv8.0.0916
Problem: Cannot specify properties of window for when opening a window for
a finished terminal job.
Solution: Add "term_opencmd".
Diffstat (limited to 'src/channel.c')
-rw-r--r-- | src/channel.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/channel.c b/src/channel.c index 22d908326..70ee2f309 100644 --- a/src/channel.c +++ b/src/channel.c @@ -4434,6 +4434,28 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2) opt->jo_set2 |= JO2_TERM_FINISH; opt->jo_term_finish = *val; } + else if (STRCMP(hi->hi_key, "term_opencmd") == 0) + { + char_u *p; + + if (!(supported2 & JO2_TERM_OPENCMD)) + break; + opt->jo_set2 |= JO2_TERM_OPENCMD; + p = opt->jo_term_opencmd = get_tv_string_chk(item); + if (p != NULL) + { + /* Must have %d and no other %. */ + p = vim_strchr(p, '%'); + if (p != NULL && (p[1] != 'd' + || vim_strchr(p + 2, '%') != NULL)) + p = NULL; + } + if (p == NULL) + { + EMSG2(_(e_invarg2), "term_opencmd"); + return FAIL; + } + } else if (STRCMP(hi->hi_key, "term_rows") == 0) { if (!(supported2 & JO2_TERM_ROWS)) |