Fix alighRight off by one
This commit is contained in:
parent
67c418f597
commit
8cb74f5dbe
|
@ -13,7 +13,7 @@ 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), y)
|
termlike.setCursorPos(math.min(x, tw-length+1), y)
|
||||||
return math.max(0, tw-length-x)
|
return math.max(0, tw-length-x+1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue