projects
/
platform
/
upstream
/
kmscon.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0bcc37
)
console: fix bug in *_move_left()
author
David Herrmann
<dh.herrmann@googlemail.com>
Sun, 5 Feb 2012 14:04:43 +0000
(15:04 +0100)
committer
David Herrmann
<dh.herrmann@googlemail.com>
Sun, 5 Feb 2012 14:04:43 +0000
(15:04 +0100)
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>
src/console.c
patch
|
blob
|
history
diff --git
a/src/console.c
b/src/console.c
index
4ad3c76
..
0e44570
100644
(file)
--- 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