From 93a6782a2b63ec9d3802d8cb941381c68024de1c Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sat, 5 Feb 2011 02:21:08 +0000 Subject: [PATCH] fix eraseline behavior. git-svn-id: svn://qnap.local/TwoTerm/trunk@2019 5590a31f-7b70-45f8-8c82-aa3a8e5f4507 --- Emulators/VT05.mm | 15 +++++++++++---- Emulators/VT52.mm | 4 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Emulators/VT05.mm b/Emulators/VT05.mm index db4f11b..b7d207b 100644 --- a/Emulators/VT05.mm +++ b/Emulators/VT05.mm @@ -178,13 +178,20 @@ enum { break; case VTEOL: - // erase line - screen->eraseLine(); + // erase line (EOL) + // erase all data from the current cursor position + // (including data in the cursor position) + // to end of the line. + screen->erase(Screen::EraseLineAfterCursor); break; case VTEOS: - // erase screen, - screen->eraseScreen(); + // erase screen (EOS) + // erase all data on the crt screen from the current + // cursor position (including data in the cursor position) + // to line 20, character position 72. + // + screen->erase(Screen::EraseAfterCursor); break; default: diff --git a/Emulators/VT52.mm b/Emulators/VT52.mm index 408bd02..47faad1 100644 --- a/Emulators/VT52.mm +++ b/Emulators/VT52.mm @@ -302,13 +302,13 @@ enum { // erasing case 'K': // erase to end of line - screen->eraseLine(); + screen->erase(Screen::EraseLineAfterCursor); _state = StateText; break; case 'J': // erase to end of screen. - screen->eraseScreen(); + screen->erase(Screen::EraseAfterCursor); _state = StateText; break;