Browse code

Fix tty_interface clear for num_lines=0

John Hawthorn authored on 28/12/2016 09:09:01
Showing 1 changed files

... ...
@@ -16,7 +16,9 @@ static void clear(tty_interface_t *state) {
16 16
 		tty_newline(tty);
17 17
 	}
18 18
 	tty_clearline(tty);
19
-	tty_moveup(tty, line - 1);
19
+	if (state->options->num_lines > 0) {
20
+		tty_moveup(tty, line - 1);
21
+	}
20 22
 	tty_flush(tty);
21 23
 }
22 24