From e1dff04f50833437c47cf1b737e69d3a73de9d63 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 22 Oct 2013 14:38:28 +0200 Subject: Make CUD more usual Whether CUD scrolls the screen or not is implementation-dependant. Applications are not supposed to assume one way or the other, but they sometimes do, and most implementations do scroll, so let's stick to common practice. * console/display.c (handle_esc_bracket): On CUD/VPR, scroll the screen instead of capping the cursor position. --- console/display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'console') diff --git a/console/display.c b/console/display.c index 97e16264..8d9e4786 100644 --- a/console/display.c +++ b/console/display.c @@ -1186,8 +1186,9 @@ handle_esc_bracket (display_t display, char op) case 'B': /* ECMA-48 . */ case 'e': /* ECMA-48 . */ /* Cursor down: , . */ - user->cursor.row += (parse->params[0] ?: 1); - limit_cursor (display); + /* Most implementations scroll the screen. */ + for (i = 0; i < (parse->params[0] ?: 1); i++) + linefeed (display); break; case 'C': /* ECMA-48 . */ /* Cursor right: , . */ -- cgit v1.2.3