summaryrefslogtreecommitdiffstats
path: root/src/channel.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-03-26 20:34:00 +0100
committerBram Moolenaar <Bram@vim.org>2020-03-26 20:34:00 +0100
commit83d4790a04780328c9c7ad22d18f404a27c11601 (patch)
treea8ba50932310b660b95073237ceb1c4fb104e6cf /src/channel.c
parent3ed9efc2b15b624268bcce4e4d312fb35840a12b (diff)
patch 8.2.0455: cannot set the highlight group for a specific terminalv8.2.0455
Problem: Cannot set the highlight group for a specific terminal. Solution: Add the "highlight" option to term_start(). (closes #5818)
Diffstat (limited to 'src/channel.c')
-rw-r--r--src/channel.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/channel.c b/src/channel.c
index 15ee0b7752..d3be7ecd38 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -5168,6 +5168,21 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
memcpy(opt->jo_ansi_colors, rgb, sizeof(rgb));
}
# endif
+ else if (STRCMP(hi->hi_key, "term_highlight") == 0)
+ {
+ char_u *p;
+
+ if (!(supported2 & JO2_TERM_HIGHLIGHT))
+ break;
+ opt->jo_set2 |= JO2_TERM_HIGHLIGHT;
+ p = tv_get_string_buf_chk(item, opt->jo_term_highlight_buf);
+ if (p == NULL || *p == NUL)
+ {
+ semsg(_(e_invargval), "term_highlight");
+ return FAIL;
+ }
+ opt->jo_term_highlight = p;
+ }
else if (STRCMP(hi->hi_key, "term_api") == 0)
{
if (!(supported2 & JO2_TERM_API))