mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-25 22:32:13 +02:00
refactor to only have one context per view
This commit is contained in:
@@ -75,6 +75,10 @@ func AsJson(i interface{}) string {
|
||||
|
||||
// used to keep a number n between 0 and max, allowing for wraparounds
|
||||
func ModuloWithWrap(n, max int) int {
|
||||
if max == 0 {
|
||||
return 0
|
||||
}
|
||||
|
||||
if n >= max {
|
||||
return n % max
|
||||
} else if n < 0 {
|
||||
|
||||
Reference in New Issue
Block a user