From 5e53cda8f5383f1e12b4bcf2d9c903945dfebf9c Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Sun, 5 Feb 2012 15:04:43 +0100 Subject: [PATCH] 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 --- src/console.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/console.c b/src/console.c index 4ad3c76..0e44570 100644 --- a/src/console.c +++ b/src/console.c @@ -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 -- 2.7.4