are several "if (cursorx < 0)" tests.
I also added another one, to make backspace
wrap backwards into the previous line, if necessary.
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3576
2b7e53f0-3cfb-0310-b3e9-
8179ed1497e1
static struct video_console *console;
-static unsigned int cursorx;
-static unsigned int cursory;
+static int cursorx;
+static int cursory;
static unsigned int cursor_enabled = 1;
static void video_console_fixup_cursor(void)
case '\b':
cursorx--;
+ if (cursorx < 0) {
+ cursory--;
+ cursorx = VIDEO_COLS;
+ }
break;
case '\t':
console = console_list[i];
if (console->get_cursor)
- console->get_cursor(&cursorx, &cursory, &cursor_enabled);
+ console->get_cursor((unsigned int*)&cursorx, (unsigned int*)&cursory, &cursor_enabled);
if (cursorx) {
cursorx = 0;