Add safety check in textinput's clamp

This commit is contained in:
Christian Rocha 2022-01-19 20:54:44 -05:00
parent fd306528f9
commit 746834a7ce

View File

@ -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))
}