console: fix bug in *_move_left()

We must take care of pending-wraps when moving left so we do not miss a
single character.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-02-05 15:04:43 +01:00
parent f0bcc37cee
commit 5e53cda8f5

View File

@ -382,6 +382,9 @@ void kmscon_console_move_left(struct kmscon_console *con, unsigned int num)
if (num > con->cells_x)
num = con->cells_x;
if (con->cursor_x >= con->cells_x)
con->cursor_x = con->cells_x - 1;
if (num > con->cursor_x)
con->cursor_x = 0;
else