diff options
author | John Hawthorn <john@hawthorn.email> | 2019-08-16 01:17:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-16 01:17:40 -0700 |
commit | b7ff1a61a845253fb090126c6cd9f29f028b66e6 (patch) | |
tree | 5a3662fb7b40386a686e5cdd0d5a0f8adef7f549 /src/tty_interface.c | |
parent | a318e00e30df4056c78ff4edf38376feb4d57dab (diff) | |
parent | 79e48082f579f6c02a55b7cff81ecee1c4127b29 (diff) |
Merge pull request #121 from jhawthorn/read-null
Add -0/--read-null
Diffstat (limited to 'src/tty_interface.c')
-rw-r--r-- | src/tty_interface.c | 6 |
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); |