From 1ce7ebeac9a6002ee9d015716d1c35ab687aa6c2 Mon Sep 17 00:00:00 2001 From: minjaesong Date: Wed, 21 Apr 2021 20:02:47 +0900 Subject: [PATCH] edit.js: highlighter position fixed when scroll > 0 --- assets/disk0/tvdos/bin/edit.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/disk0/tvdos/bin/edit.js b/assets/disk0/tvdos/bin/edit.js index 1a631f5..39ae3ec 100644 --- a/assets/disk0/tvdos/bin/edit.js +++ b/assets/disk0/tvdos/bin/edit.js @@ -356,8 +356,8 @@ function cursorMoveRelative(odx, ody) { } // remove old caret highlights if (dy != 0 && COL_CARET_ROW !== undefined) { - drawTextLine(cursorRow - dy); - drawTextLine(cursorRow); + drawTextLine(cursorRow - scroll - dy); + drawTextLine(cursorRow - scroll); } drawLnCol(); gotoText(); @@ -417,10 +417,10 @@ while (!exit) { cursorMoveRelative(-BIG_STRIDE,1); } else if (key == con.KEY_PAGE_UP) { - cursorMoveRelative(0, -paintHeight + 1); + cursorMoveRelative(0, -paintHeight + scrollPeek); } else if (key == con.KEY_PAGE_DOWN) { - cursorMoveRelative(0, paintHeight - 1); + cursorMoveRelative(0, paintHeight - scrollPeek); } else if (key == con.KEY_HOME) { cursorMoveRelative(-BIG_STRIDE, 0);