mirror of
				https://github.com/Maks1mS/bubbles.git
				synced 2025-11-04 07:31:23 +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 {
 | 
			
		||||
	if high < low {
 | 
			
		||||
		low, high = high, low
 | 
			
		||||
	}
 | 
			
		||||
	return min(high, max(low, v))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user