comparison src/channel.c @ 20524:bed30e6b5a09 v8.2.0816

patch 8.2.0816: terminal test fails when compiled with Athena Commit: https://github.com/vim/vim/commit/87202264f8e27f084c0e58f98aeb27fa5c6d5251 Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 24 17:23:45 2020 +0200 patch 8.2.0816: terminal test fails when compiled with Athena 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)
author Bram Moolenaar <Bram@vim.org>
date Sun, 24 May 2020 17:30:03 +0200
parents 4c317d8c1051
children 5e86e00fa712
comparison
equal deleted inserted replaced
20523:775e169d4cfc 20524:bed30e6b5a09
5306 li = item->vval.v_list->lv_first; 5306 li = item->vval.v_list->lv_first;
5307 for (; li != NULL && n < 16; li = li->li_next, n++) 5307 for (; li != NULL && n < 16; li = li->li_next, n++)
5308 { 5308 {
5309 char_u *color_name; 5309 char_u *color_name;
5310 guicolor_T guicolor; 5310 guicolor_T guicolor;
5311 int called_emsg_before = called_emsg;
5311 5312
5312 color_name = tv_get_string_chk(&li->li_tv); 5313 color_name = tv_get_string_chk(&li->li_tv);
5313 if (color_name == NULL) 5314 if (color_name == NULL)
5314 return FAIL; 5315 return FAIL;
5315 5316
5316 guicolor = GUI_GET_COLOR(color_name); 5317 guicolor = GUI_GET_COLOR(color_name);
5317 if (guicolor == INVALCOLOR) 5318 if (guicolor == INVALCOLOR)
5319 {
5320 if (called_emsg_before == called_emsg)
5321 // may not get the error if the GUI didn't start
5322 semsg(_(e_alloc_color), color_name);
5318 return FAIL; 5323 return FAIL;
5324 }
5319 5325
5320 rgb[n] = GUI_MCH_GET_RGB(guicolor); 5326 rgb[n] = GUI_MCH_GET_RGB(guicolor);
5321 } 5327 }
5322 5328
5323 if (n != 16 || li != NULL) 5329 if (n != 16 || li != NULL)