mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
support split view in staging panel and staging ranges
This commit is contained in:
@ -233,18 +233,18 @@ func NextIndex(numbers []int, currentNumber int) int {
|
||||
return index
|
||||
}
|
||||
}
|
||||
return 0
|
||||
return len(numbers) - 1
|
||||
}
|
||||
|
||||
// PrevIndex returns the index that comes before the given number, cycling if we reach the end
|
||||
func PrevIndex(numbers []int, currentNumber int) int {
|
||||
end := len(numbers) - 1
|
||||
for i := end; i >= 0; i -= 1 {
|
||||
for i := end; i >= 0; i-- {
|
||||
if numbers[i] < currentNumber {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return end
|
||||
return 0
|
||||
}
|
||||
|
||||
func AsJson(i interface{}) string {
|
||||
|
Reference in New Issue
Block a user