Mercurial > vim
diff src/channel.c @ 19797:d73d982499ae v8.2.0455
patch 8.2.0455: cannot set the highlight group for a specific terminal
Commit: https://github.com/vim/vim/commit/83d4790a04780328c9c7ad22d18f404a27c11601
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Mar 26 20:34:00 2020 +0100
patch 8.2.0455: cannot set the highlight group for a specific terminal
Problem: Cannot set the highlight group for a specific terminal.
Solution: Add the "highlight" option to term_start(). (closes https://github.com/vim/vim/issues/5818)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 26 Mar 2020 20:45:03 +0100 |
parents | f46d3a9fe27d |
children | 49e38e5472e6 |
line wrap: on
line diff
--- a/src/channel.c +++ b/src/channel.c @@ -5168,6 +5168,21 @@ get_job_options(typval_T *tv, jobopt_T * 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))