mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-11-21 07:44:49 +00:00
Correct implementation of clamp
That's what I get for inlining definitions.
This commit is contained in:
@@ -527,7 +527,7 @@ function read( _sReplaceChar, _tHistory, _fnComplete, _sDefault )
|
|||||||
local _, cy = term.getCursorPos()
|
local _, cy = term.getCursorPos()
|
||||||
if param2 >= sx and param2 <= w and param2 == cy then
|
if param2 >= sx and param2 <= w and param2 == cy then
|
||||||
-- Then ensure we don't scroll beyond the current line
|
-- Then ensure we don't scroll beyond the current line
|
||||||
nPos = math.min(math.max(nScroll + x - sx, 0, #sLine))
|
nPos = math.min(math.max(nScroll + x - sx, 0), #sLine)
|
||||||
redraw()
|
redraw()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user