diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2023-02-22 19:36:31 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-02-22 19:36:31 +1100 |
commit | 78f3a7a4786bf5f70af3489e6c4f2e44cddbd978 (patch) | |
tree | 4e1920587bb05585816107e05ab3c42a8fa9bfc6 /pkg/gui | |
parent | 526c9dea9b298d69a3fafec3303549b0d6292af4 (diff) |
migrate interactive rebase integration tests
Diffstat (limited to 'pkg/gui')
-rw-r--r-- | pkg/gui/controllers/local_commits_controller.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/gui/controllers/local_commits_controller.go b/pkg/gui/controllers/local_commits_controller.go index 6465dd292..01a531bc9 100644 --- a/pkg/gui/controllers/local_commits_controller.go +++ b/pkg/gui/controllers/local_commits_controller.go @@ -358,6 +358,12 @@ func (self *LocalCommitsController) handleMidRebaseCommand(action string, commit func (self *LocalCommitsController) moveDown(commit *models.Commit) error { index := self.context().GetSelectedLineIdx() commits := self.model.Commits + + // can't move past the initial commit + if index >= len(commits)-1 { + return nil + } + if commit.Status == "rebasing" { if commits[index+1].Status != "rebasing" { return nil |