mirror of
https://github.com/Maks1mS/bubbles.git
synced 2025-01-11 14:38:10 +03:00
Add safety check in textinput's clamp
This commit is contained in:
parent
fd306528f9
commit
746834a7ce
@ -800,6 +800,9 @@ func Paste() tea.Msg {
|
||||
}
|
||||
|
||||
func clamp(v, low, high int) int {
|
||||
if high < low {
|
||||
low, high = high, low
|
||||
}
|
||||
return min(high, max(low, v))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user