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
|
||||
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue