diff options
Diffstat (limited to 'src/interface-curses/interface.c')
| -rw-r--r-- | src/interface-curses/interface.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/interface-curses/interface.c b/src/interface-curses/interface.c index 4f00bcf..6863a3b 100644 --- a/src/interface-curses/interface.c +++ b/src/interface-curses/interface.c @@ -244,7 +244,7 @@ static struct { static gshort teco_color_pair(attr_t *attr, gshort fg, gshort bg) { - static gshort next_pair = 1; + static guint next_pair = 1; /* * Basic support for monochrome terminals: @@ -255,7 +255,7 @@ teco_color_pair(attr_t *attr, gshort fg, gshort bg) */ if (!has_colors()) { if (bg != COLOR_BLACK) - *attr |= A_REVERSE; + *attr |= WA_REVERSE; return 0; } @@ -264,7 +264,7 @@ teco_color_pair(attr_t *attr, gshort fg, gshort bg) gpointer value = g_hash_table_lookup(teco_interface.pair_table, key); if (G_LIKELY(value != NULL)) return GPOINTER_TO_UINT(value); - if (G_UNLIKELY(next_pair >= MIN(COLOR_PAIRS, G_MAXSHORT))) + if (G_UNLIKELY(next_pair >= MIN(COLOR_PAIRS, G_MAXSHORT+1))) return 0; init_pair(next_pair, fg, bg); g_hash_table_insert(teco_interface.pair_table, key, GUINT_TO_POINTER(next_pair)); @@ -443,7 +443,7 @@ teco_interface_init(gint argc, gchar **argv) teco_cmdline_init(); /* * The default INDIC_STRIKE wouldn't be visible. - * Instead we use INDIC_SQUIGGLE, which is rendered as A_UNDERLINE. + * Instead we use INDIC_SQUIGGLE, which is rendered as WA_UNDERLINE. */ teco_cmdline_ssm(SCI_INDICSETSTYLE, INDICATOR_RUBBEDOUT, INDIC_SQUIGGLE); /* |
