From 4a8ee545c2f001a9d59ce1c7cafd9aa156f1976e Mon Sep 17 00:00:00 2001 From: Michael Mackus Date: Wed, 18 Jul 2018 14:54:22 -0700 Subject: Add support for underlining selected item --- src/tty_interface.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/tty_interface.c') diff --git a/src/tty_interface.c b/src/tty_interface.c index 1af647c..4d4d52f 100644 --- a/src/tty_interface.c +++ b/src/tty_interface.c @@ -46,7 +46,11 @@ static void draw_match(tty_interface_t *state, const char *choice, int selected) } if (selected) +#ifdef TTY_SELECTION_UNDERLINE + tty_setunderline(tty); +#else tty_setinvert(tty); +#endif for (size_t i = 0, p = 0; choice[i] != '\0'; i++) { if (i + 1 < maxwidth) { -- cgit v1.2.3