mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
allow changing tabs with [ and ]
This commit is contained in:
@ -299,3 +299,14 @@ func DifferenceInt(a, b []int) []int {
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
// used to keep a number n between 0 and max, allowing for wraparounds
|
||||
func ModuloWithWrap(n, max int) int {
|
||||
if n >= max {
|
||||
return n % max
|
||||
} else if n < 0 {
|
||||
return max + n
|
||||
} else {
|
||||
return n
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user