mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-05 04:36:07 +00:00
Add safety check in textinput's clamp
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user