Fix missing y in setCursorPos in winhlp.alignRight

This commit is contained in:
Ben 2024-06-02 01:10:16 +02:00
parent e414f229db
commit 10fda87de5
Signed by: ben
GPG key ID: 0F54A7ED232D3319

View file

@ -12,7 +12,7 @@ end
local function alignRight(termlike, length) local function alignRight(termlike, length)
local tw, th = termlike.getSize() local tw, th = termlike.getSize()
local x, y = termlike.getCursorPos() local x, y = termlike.getCursorPos()
termlike.setCursorPos(math.min(x, tw-length+1)) termlike.setCursorPos(math.min(x, tw-length+1), y)
return math.max(0, tw-length-x) return math.max(0, tw-length-x)
end end