From c4524ae7aaa85f1569d6be1a8538b3650bc06f89 Mon Sep 17 00:00:00 2001 From: Ashkan Kiani Date: Fri, 3 May 2019 03:30:13 -0700 Subject: Add ability to use null as input delimiter. Update tty to print newline as space Add tty_putc --- src/tty_interface.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/tty_interface.c') diff --git a/src/tty_interface.c b/src/tty_interface.c index f366a23..225f33a 100644 --- a/src/tty_interface.c +++ b/src/tty_interface.c @@ -65,7 +65,11 @@ static void draw_match(tty_interface_t *state, const char *choice, int selected) } else { tty_setfg(tty, TTY_COLOR_NORMAL); } - tty_printf(tty, "%c", choice[i]); + if (choice[i] == '\n') { + tty_putc(tty, ' '); + } else { + tty_printf(tty, "%c", choice[i]); + } } tty_setwrap(tty); tty_setnormal(tty); -- cgit v1.2.3