From ec2bf5d74c07fb9a8eeebd32687bab7cbbcdbe95 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Wed, 18 Sep 2002 10:22:10 +0000 Subject: 2002-09-18 Marcus Brinkmann * display.c (handle_esc_bracket): Use scrolling region for , , , , , , and
. Also fix off-by-one error in , . --- console/ChangeLog | 4 ++++ console/display.c | 23 ++++++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) (limited to 'console') diff --git a/console/ChangeLog b/console/ChangeLog index 6d6a3b72..9ba7ff7f 100644 --- a/console/ChangeLog +++ b/console/ChangeLog @@ -1,5 +1,9 @@ 2002-09-18 Marcus Brinkmann + * display.c (handle_esc_bracket): Use scrolling region for , + , , , , , and
. Also fix + off-by-one error in , . + * hurd.ti: Change and to escape bracket right-angle sequences. Add , , and , disable . diff --git a/console/display.c b/console/display.c index 566b9c3f..985eb759 100644 --- a/console/display.c +++ b/console/display.c @@ -1300,14 +1300,18 @@ handle_esc_bracket (display_t display, char op) case 'L': /* ECMA-48 . */ /* Insert line(s): , . */ screen_shift_right (display, 0, user->cursor.row, - user->screen.width - 1, user->screen.height - 1, + user->screen.width - 1, + (user->cursor.row <= display->csr.bottom) + ? display->csr.bottom : user->screen.height - 1, (parse->params[0] ?: 1) * user->screen.width, L' ', display->attr.current); break; case 'M': /* ECMA-48
. */ /* Delete line(s): ,
. */ screen_shift_left (display, 0, user->cursor.row, - user->screen.width - 1, user->screen.height - 1, + user->screen.width - 1, + (user->cursor.row <= display->csr.bottom) + ? display->csr.bottom : user->screen.height - 1, (parse->params[0] ?: 1) * user->screen.width, L' ', display->attr.current); break; @@ -1346,15 +1350,15 @@ handle_esc_bracket (display_t display, char op) break; case 'S': /* ECMA-48 . */ /* Scroll up: , . */ - screen_shift_left (display, 0, 0, - user->screen.width - 1, user->screen.height - 1, + screen_shift_left (display, 0, display->csr.top, + user->screen.width - 1, display->csr.bottom, (parse->params[0] ?: 1) * user->screen.width, L' ', display->attr.current); break; case 'T': /* ECMA-48 . */ /* Scroll down: , . */ - screen_shift_right (display, 0, 0, - user->screen.width, user->screen.height, + screen_shift_right (display, 0, display->csr.top, + user->screen.width - 1, display->csr.bottom, (parse->params[0] ?: 1) * user->screen.width, L' ', display->attr.current); break; @@ -1625,9 +1629,10 @@ display_output_one (display_t display, wchar_t chr) && user->cursor.col != user->screen.width - 1) { /* If in insert mode, do the same as . */ - screen_shift_right (display, user->cursor.col, user->cursor.row, - user->screen.width - 1, user->cursor.row, 1, - L' ', display->attr.current); + screen_shift_right (display, user->cursor.col, + user->cursor.row, + user->screen.width - 1, user->cursor.row, + 1, L' ', display->attr.current); } user->_matrix[idx].chr = display->attr.altchar -- cgit v1.2.3