Skip to content

Commit

Permalink
check curses.colors
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Mar 17, 2019
1 parent e153b30 commit 482b0b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/lcurses/lcurses.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,9 @@ static int lc_pair_content(lua_State *L)
return 2;
}

#ifdef COLORS
LC_NUMBER2(COLORS, COLORS)
#endif
LC_NUMBER2(COLOR_PAIRS, COLOR_PAIRS)

static int lc_COLOR_PAIR(lua_State *L)
Expand Down Expand Up @@ -2252,7 +2254,9 @@ static const luaL_Reg curseslib[] =
{ "has_colors", lc_has_colors },
{ "init_pair", lc_init_pair },
{ "pair_content", lc_pair_content },
#ifdef COLORS
{ "colors", lc_COLORS },
#endif
{ "color_pairs", lc_COLOR_PAIRS },
{ "color_pair", lc_COLOR_PAIR },

Expand Down

0 comments on commit 482b0b4

Please sign in to comment.