vt.c: Fix off-by-one in clear to end of line escape sequence
authorTormod Volden <debian.tormod@gmail.com>
Sun, 29 May 2016 11:41:31 +0000 (13:41 +0200)
committerAlan Cox <alan@etchedpixels.co.uk>
Tue, 31 May 2016 11:43:27 +0000 (12:43 +0100)
It wouldn't clear the last column on the screen.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Kernel/vt.c

index 0dc45f4..d930175 100644 (file)
@@ -178,12 +178,12 @@ static int escout(unsigned char c)
                return 0;
        }
        if (c == 'J') {
-               clear_across(cursory, cursorx, VT_RIGHT - cursorx);
+               clear_across(cursory, cursorx, VT_RIGHT - cursorx + 1);
                clear_lines(cursory + 1, VT_BOTTOM - cursory);
                return 0;
        }
        if (c == 'K') {
-               clear_across(cursory, cursorx, VT_RIGHT - cursorx);
+               clear_across(cursory, cursorx, VT_RIGHT - cursorx + 1);
                return 0;
        }
        if (c == 'Y')