mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-04-11 13:23:19 +00:00
Correct implementation of clamp
That's what I get for inlining definitions.
This commit is contained in:
parent
3c8c0d78ef
commit
08cf55e55f
@ -527,7 +527,7 @@ function read( _sReplaceChar, _tHistory, _fnComplete, _sDefault )
|
||||
local _, cy = term.getCursorPos()
|
||||
if param2 >= sx and param2 <= w and param2 == cy then
|
||||
-- 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()
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user