Fix missing y in setCursorPos in winhlp.alignRight
This commit is contained in:
parent
e414f229db
commit
10fda87de5
|
@ -10,9 +10,9 @@ local function contains(window, x, y)
|
||||||
end
|
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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue