aboutsummaryrefslogtreecommitdiffstats
path: root/src/getstring.c
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2018-01-10 15:49:13 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2018-05-26 11:30:03 +0200
commita5cc46cd550b335b0de6ce7658e0c1ca5068255e (patch)
tree2890f0d03bf518de650e29dea16906b56443397e /src/getstring.c
parent65dd82a626f9414eec57c4d8c0e5302809d9a9e1 (diff)
downloadcalcurse-a5cc46cd550b335b0de6ce7658e0c1ca5068255e.tar.gz
calcurse-a5cc46cd550b335b0de6ce7658e0c1ca5068255e.zip
Transparent cursor fix
Commit f8e6e0d (Fix no-colour theme, 2017-12-10) partly destroyed the cursor in getstring() by turning it into a solid block. The fix reintroduces wchgat() which requires a color pair argument. When no colors are wanted, color pair 0 is used. A similar problem exists in the layout and colour customization windows and is fixed in the same way: move to the position and apply the reverse video attribute. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/getstring.c')
-rw-r--r--src/getstring.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/getstring.c b/src/getstring.c
index 10a6f5e..d558331 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 */
- mvwaddch(win, y, st->ci[st->pos].dpyoff - st->ci[st->scrpos].dpyoff,
- SPACE | A_REVERSE);
+ wmove(win, y, st->ci[st->pos].dpyoff - st->ci[st->scrpos].dpyoff);
+ wchgat(win, 1, A_REVERSE, (colorize ? COLR_CUSTOM : 0), NULL);
}
/* Delete a character at the given position in string. */