summaryrefslogtreecommitdiff
path: root/console
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2002-09-18 10:22:10 +0000
committerMarcus Brinkmann <marcus@gnu.org>2002-09-18 10:22:10 +0000
commitec2bf5d74c07fb9a8eeebd32687bab7cbbcdbe95 (patch)
tree3f24daa48bf36ca43fb375fc72961dd480e7b319 /console
parent35a3ea6a1863749768f0728fc25c9fd1fc3236f0 (diff)
2002-09-18 Marcus Brinkmann <marcus@gnu.org>
* display.c (handle_esc_bracket): Use scrolling region for <ind>, <indn>, <ri>, <rin>, <il1>, <il>, <dl1> and <dl>. Also fix off-by-one error in <ri>, <rin>.
Diffstat (limited to 'console')
-rw-r--r--console/ChangeLog4
-rw-r--r--console/display.c23
2 files changed, 18 insertions, 9 deletions
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 <marcus@gnu.org>
+ * display.c (handle_esc_bracket): Use scrolling region for <ind>,
+ <indn>, <ri>, <rin>, <il1>, <il>, <dl1> and <dl>. Also fix
+ off-by-one error in <ri>, <rin>.
+
* hurd.ti: Change <gsbom> and <grbom> to escape bracket
right-angle sequences. Add <csr>, <smir>, <rmir> and <mir>,
disable <ich1>.
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 <IL>. */
/* Insert line(s): <il1>, <il>. */
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 <DL>. */
/* Delete line(s): <dl1>, <dl>. */
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 <SU>. */
/* Scroll up: <ind>, <indn>. */
- 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 <SD>. */
/* Scroll down: <ri>, <rin>. */
- 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 <ich1>. */
- 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