From 7fa9feae452ea05a083b17d3f0cdf69bf5d37822 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Mon, 26 Jan 2026 19:50:03 +0100 Subject: Curses: support up to 32767 color pairs * Instead of ORing COLOR_PAIR() into attributes, always pass separate `pair` arguments. Since they are `short` this allows for up to 32767 color pairs. Previously, we could only count on 256 color pairs (or 128 for SciTECO and Scinterm each). * Analoguous changes have been made to Scinterm. See also https://github.com/orbitalquark/scinterm/pull/37 Since it only correctly checks for overflows at the end of the color pair space, we allocate the second half of that space to Scinterm. It is now very unlikely to overflow the color pair space, though. * This wasn't critical of course since even the 128 pairs would be unlikely to exhaust as long as we support only 16 ANSI colors. Scinterm however supports arbitrary RGB colors and we might want to do so soon as well. --- src/interface-curses/curses-info-popup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/interface-curses/curses-info-popup.h') diff --git a/src/interface-curses/curses-info-popup.h b/src/interface-curses/curses-info-popup.h index fd923e9..898ba70 100644 --- a/src/interface-curses/curses-info-popup.h +++ b/src/interface-curses/curses-info-popup.h @@ -49,7 +49,7 @@ teco_curses_info_popup_init(teco_curses_info_popup_t *ctx) void teco_curses_info_popup_add(teco_curses_info_popup_t *ctx, teco_popup_entry_type_t type, const gchar *name, gsize name_len, gboolean highlight); -void teco_curses_info_popup_show(teco_curses_info_popup_t *ctx, attr_t attr); +void teco_curses_info_popup_show(teco_curses_info_popup_t *ctx, attr_t attr, gshort pair); const teco_string_t *teco_curses_info_popup_getentry(teco_curses_info_popup_t *ctx, gint y, gint x); void teco_curses_info_popup_scroll_page(teco_curses_info_popup_t *ctx); void teco_curses_info_popup_scroll(teco_curses_info_popup_t *ctx, gint delta); -- cgit v1.2.3