From 24c53060e85080e693c0ee530ef4c873445afaa0 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Wed, 28 Dec 2016 01:09:01 -0800 Subject: Fix tty_interface clear for num_lines=0 --- src/tty_interface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/tty_interface.c b/src/tty_interface.c index 0385719..db0b7e2 100644 --- a/src/tty_interface.c +++ b/src/tty_interface.c @@ -16,7 +16,9 @@ static void clear(tty_interface_t *state) { tty_newline(tty); } tty_clearline(tty); - tty_moveup(tty, line - 1); + if (state->options->num_lines > 0) { + tty_moveup(tty, line - 1); + } tty_flush(tty); } -- cgit v1.2.3