vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 7747bb1a6c548c3a549fad28bd3acf87d69ede6c
parent a0ec0f2145d01dc2c48c3e2c8e4006e21700b5e1
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Mon, 19 Feb 2018 09:34:14 +0100

Merge branch 'colors-6.1' of https://github.com/michaelforney/vis

Diffstat:
Mui-terminal-curses.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ui-terminal-curses.c b/ui-terminal-curses.c @@ -41,7 +41,7 @@ # define NCURSES_EXT_COLORS 0 # endif # if !NCURSES_EXT_COLORS -# define MAX_COLOR_PAIRS 256 +# define MAX_COLOR_PAIRS MIN(COLOR_PAIRS, 256) # endif #endif #ifndef MAX_COLOR_PAIRS @@ -179,7 +179,7 @@ static short color_pair_get(short fg, short bg) { if (default_bg == -1) default_bg = CELL_COLOR_BLACK; has_default_colors = (use_default_colors() == OK); - color_pairs_max = MIN(COLOR_PAIRS, MAX_COLOR_PAIRS); + color_pairs_max = MIN(MAX_COLOR_PAIRS, SHRT_MAX); if (COLORS) color2palette = calloc((COLORS + 2) * (COLORS + 2), sizeof(short)); }