From 59af407eb17092a6284bef251f44f1bd173cf5e8 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Tue, 1 Apr 2025 16:51:05 +0200 Subject: [PATCH] Fix the bug described in the previous commit --- pkg/gui/controllers/local_commits_controller.go | 1 + .../interactive_rebase/drop_todo_commit_with_update_ref.go | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/gui/controllers/local_commits_controller.go b/pkg/gui/controllers/local_commits_controller.go index c459f4261..79e3a6549 100644 --- a/pkg/gui/controllers/local_commits_controller.go +++ b/pkg/gui/controllers/local_commits_controller.go @@ -608,6 +608,7 @@ func (self *LocalCommitsController) restoreSelectionRangeAndMode(selectionRangeA }) if ok1 && ok2 { self.context().SetSelectionRangeAndMode(newSelectedIdx, newRangeStartIdx, selectionRangeAndMode.mode) + self.context().HandleFocus(types.OnFocusOpts{}) } } diff --git a/pkg/integration/tests/interactive_rebase/drop_todo_commit_with_update_ref.go b/pkg/integration/tests/interactive_rebase/drop_todo_commit_with_update_ref.go index 8eff10632..8510055af 100644 --- a/pkg/integration/tests/interactive_rebase/drop_todo_commit_with_update_ref.go +++ b/pkg/integration/tests/interactive_rebase/drop_todo_commit_with_update_ref.go @@ -49,10 +49,7 @@ var DropTodoCommitWithUpdateRef = NewIntegrationTest(NewIntegrationTestArgs{ Contains("CI commit 01"), ). Tap(func() { - /* EXPECTED: t.Views().Main().Content(Contains("commit 02")) - ACTUAL: */ - t.Views().Main().Content(Contains("commit 03")) }). NavigateToLine(Contains("commit 06")). Press(keys.Universal.Remove)