From f8e6e0d69162ee30998e433bdcd223c9537937b0 Mon Sep 17 00:00:00 2001 From: Lars Henriksen Date: Sun, 10 Dec 2017 00:02:08 +0100 Subject: Fix no-colour theme In colour customization, pressing cancel ('ESC' by default) will deselect all colours and put calcurse in no-color mode. For this to work, all colour changes must be performed with the routines custom_apply_attr()/custom_remove_attr(). Fixed for the getstring cursor, the scroll window border and the week number. In addition, the week number is unconditionally coloured as the rest of the calendar contents whether CAL is selected or not. Signed-off-by: Lukas Fleischer --- src/getstring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/getstring.c') diff --git a/src/getstring.c b/src/getstring.c index 8352f40..10a6f5e 100644 --- a/src/getstring.c +++ b/src/getstring.c @@ -69,8 +69,8 @@ static void getstr_print(WINDOW * win, int x, int y, mvwprintw(win, y, col - 2, " %c", c); /* print cursor */ - wmove(win, y, st->ci[st->pos].dpyoff - st->ci[st->scrpos].dpyoff); - wchgat(win, 1, A_REVERSE, COLR_CUSTOM, NULL); + mvwaddch(win, y, st->ci[st->pos].dpyoff - st->ci[st->scrpos].dpyoff, + SPACE | A_REVERSE); } /* Delete a character at the given position in string. */ -- cgit v1.2.3-54-g00ecf