mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-03 05:32:08 -07:00
Add support for ANSI color codes
This commit is contained in:
@@ -27,6 +27,17 @@ func Max32(first int32, second int32) int32 {
|
||||
return second
|
||||
}
|
||||
|
||||
// Constrain32 limits the given 32-bit integer with the upper and lower bounds
|
||||
func Constrain32(val int32, min int32, max int32) int32 {
|
||||
if val < min {
|
||||
return min
|
||||
}
|
||||
if val > max {
|
||||
return max
|
||||
}
|
||||
return val
|
||||
}
|
||||
|
||||
// Constrain limits the given integer with the upper and lower bounds
|
||||
func Constrain(val int, min int, max int) int {
|
||||
if val < min {
|
||||
|
Reference in New Issue
Block a user