From 6e44c4edf999b97a3cf364520dd6fc0b083832c3 Mon Sep 17 00:00:00 2001 From: Productive2 <48047721+Productive2@users.noreply.github.com> Date: Tue, 23 Feb 2021 17:40:21 +0100 Subject: [PATCH] minor optimization --- src/jale/editor.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jale/editor.nim b/src/jale/editor.nim index c92edce..7e92982 100644 --- a/src/jale/editor.nim +++ b/src/jale/editor.nim @@ -127,7 +127,7 @@ proc fullRender(editor: LineEditor) = # return to the selected y pos let vindex = editor.content.Y - editor.vscroll - cursorUp(rendered - vindex + extraup) + cursorUp(lastY + 1 - editor.content.Y + extraup) proc moveCursorToEnd(editor: LineEditor) = # only called when read finished