mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-13 01:30:53 +02:00
fixup! Move to next stageable line after adding a line to a custom patch
This commit is contained in:
@ -325,8 +325,10 @@ func wrapPatchLines(diff string, view *gocui.View) ([]int, []int) {
|
||||
return viewLineIndices, patchLineIndices
|
||||
}
|
||||
|
||||
func (s *State) SelectNextStageableLine() {
|
||||
func (s *State) SelectNextStageableLineOfSameIncludedState(includedLines []int, included bool) {
|
||||
_, lastLineIdx := s.SelectedPatchRange()
|
||||
patchLineIdx := s.patch.GetNextChangeIdx(lastLineIdx + 1)
|
||||
s.SelectLine(s.viewLineIndices[patchLineIdx])
|
||||
patchLineIdx, found := s.patch.GetNextChangeIdxOfSameIncludedState(lastLineIdx+1, includedLines, included)
|
||||
if found {
|
||||
s.SelectLine(s.viewLineIndices[patchLineIdx])
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user