From 10fda87de54bcc109ad7722988d09bbc952e3b55 Mon Sep 17 00:00:00 2001 From: Benedikt Ziemons Date: Sun, 2 Jun 2024 01:10:16 +0200 Subject: [PATCH] Fix missing y in setCursorPos in winhlp.alignRight --- winhlp.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winhlp.lua b/winhlp.lua index 2dc172b..af6ce32 100644 --- a/winhlp.lua +++ b/winhlp.lua @@ -10,9 +10,9 @@ local function contains(window, x, y) end local function alignRight(termlike, length) - local tw,th = termlike.getSize() - local x,y = termlike.getCursorPos() - termlike.setCursorPos(math.min(x, tw-length+1)) + local tw, th = termlike.getSize() + local x, y = termlike.getCursorPos() + termlike.setCursorPos(math.min(x, tw-length+1), y) return math.max(0, tw-length-x) end