From c2ee88ba0ec9efd93f1db0718c9659cb82d3d8bd Mon Sep 17 00:00:00 2001 From: "kepler155c@gmail.com" Date: Mon, 18 Feb 2019 03:17:29 -0500 Subject: [PATCH] fix cursor positioning --- sys/apis/terminal.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/apis/terminal.lua b/sys/apis/terminal.lua index 904f36e..6cdacbd 100644 --- a/sys/apis/terminal.lua +++ b/sys/apis/terminal.lua @@ -82,12 +82,16 @@ function Terminal.window(parent, sx, sy, w, h, isVisible) function win.setCursorPos(x, y) cx, cy = x, y - parent.setCursorPos(x + canvas.x - 1, y + canvas.y - 1) + if isVisible then + parent.setCursorPos(x + canvas.x - 1, y + canvas.y - 1) + end end function win.setCursorBlink(b) blink = b - parent.setCursorBlink(b) + if isVisible then + parent.setCursorBlink(b) + end end function win.isColor()