Skip to content

Commit 297440f

Browse files
committed
Merge pull request #276 from macvim-dev/fix/termguicolors
Fix termgui_mch_get_color in MacVim
2 parents df7edfe + a111780 commit 297440f

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/MacVim/gui_macvim.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,6 +1563,9 @@
15631563
guicolor_T
15641564
gui_mch_get_color(char_u *name)
15651565
{
1566+
if (![MMBackend sharedInstance])
1567+
return INVALCOLOR;
1568+
15661569
#ifdef FEAT_MBYTE
15671570
name = CONVERT_TO_UTF8(name);
15681571
#endif

src/term.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,6 +1269,12 @@ static struct builtin_term builtin_termcaps[] =
12691269
guicolor_T
12701270
termgui_mch_get_color(char_u *name)
12711271
{
1272+
# if defined(FEAT_GUI_MACVIM)
1273+
guicolor_T t;
1274+
t = gui_mch_get_color(name);
1275+
if (t != INVALCOLOR)
1276+
return t;
1277+
# endif
12721278
return gui_get_color_cmn(name);
12731279
}
12741280

0 commit comments

Comments
 (0)