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