summaryrefslogtreecommitdiff
path: root/src/tty_interface.c
diff options
context:
space:
mode:
authorAshkan Kiani <ashkan.k.kiani@gmail.com>2019-05-03 03:30:13 -0700
committerJohn Hawthorn <john@hawthorn.email>2019-08-16 01:05:01 -0700
commitc4524ae7aaa85f1569d6be1a8538b3650bc06f89 (patch)
tree326bc7c96be446cba02b99f7dad3e6b9e08aad39 /src/tty_interface.c
parenta318e00e30df4056c78ff4edf38376feb4d57dab (diff)
Add ability to use null as input delimiter.
Update tty to print newline as space Add tty_putc
Diffstat (limited to 'src/tty_interface.c')
-rw-r--r--src/tty_interface.c6
1 files changed, 5 insertions, 1 deletions
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);