properly calculate end-of-line jump
authorKay Sievers <kay@vrfy.org>
Mon, 29 Jul 2013 22:56:39 +0000 (00:56 +0200)
committerKay Sievers <kay@vrfy.org>
Mon, 29 Jul 2013 22:56:39 +0000 (00:56 +0200)
src/efi/gummiboot.c

index cec606f..6f7c329 100644 (file)
@@ -360,7 +360,7 @@ static BOOLEAN line_edit(CHAR16 *line_in, CHAR16 **line_out, UINTN x_max, UINTN
 
                 case KEYCODE(SCAN_END, 0):
                 case KEYCODE(0, CHAR_CTRL('e')):
-                        cursor = len;
+                        cursor = len - first;
                         if (cursor+1 >= x_max) {
                                 cursor = x_max-1;
                                 first = len - (x_max-1);