diff options
author | John Hawthorn <john.hawthorn@gmail.com> | 2016-12-28 01:09:01 -0800 |
---|---|---|
committer | John Hawthorn <john.hawthorn@gmail.com> | 2016-12-28 01:11:06 -0800 |
commit | 24c53060e85080e693c0ee530ef4c873445afaa0 (patch) | |
tree | ec99c7170623b21dff5373b39f47774ff712169b /src/tty_interface.c | |
parent | 0341d2fa077a148aa5779bf4e00dccc943c96289 (diff) |
Fix tty_interface clear for num_lines=0
Diffstat (limited to 'src/tty_interface.c')
-rw-r--r-- | src/tty_interface.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); } |