diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-05-24 17:23:45 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-05-24 17:23:45 +0200 |
commit | 87202264f8e27f084c0e58f98aeb27fa5c6d5251 (patch) | |
tree | 759227c129d05bbc533dc54554258a9f303ada5f /src/channel.c | |
parent | 9c65253fe702ea010afec11aa971acd542c35de2 (diff) | |
download | vim-git-87202264f8e27f084c0e58f98aeb27fa5c6d5251.tar.gz |
patch 8.2.0816: terminal test fails when compiled with Athenav8.2.0816
Problem: Terminal test fails when compiled with Athena.
Solution: Do give an error when the GUI is not running. (hint by Dominique
Pelle, closes #5928, closes #6132)
Diffstat (limited to 'src/channel.c')
-rw-r--r-- | src/channel.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/channel.c b/src/channel.c index 68adbc378..2b85ec91d 100644 --- a/src/channel.c +++ b/src/channel.c @@ -5308,6 +5308,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2) { char_u *color_name; guicolor_T guicolor; + int called_emsg_before = called_emsg; color_name = tv_get_string_chk(&li->li_tv); if (color_name == NULL) @@ -5315,7 +5316,12 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2) guicolor = GUI_GET_COLOR(color_name); if (guicolor == INVALCOLOR) + { + if (called_emsg_before == called_emsg) + // may not get the error if the GUI didn't start + semsg(_(e_alloc_color), color_name); return FAIL; + } rgb[n] = GUI_MCH_GET_RGB(guicolor); } |