mirror of
				https://github.com/Maks1mS/bubbles.git
				synced 2025-10-30 21:37:13 +03: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 { | func clamp(v, low, high int) int { | ||||||
|  | 	if high < low { | ||||||
|  | 		low, high = high, low | ||||||
|  | 	} | ||||||
| 	return min(high, max(low, v)) | 	return min(high, max(low, v)) | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user