diff --git a/pkg/gui/controllers/staging_controller.go b/pkg/gui/controllers/staging_controller.go index 78129ebe0..0a8ca5521 100644 --- a/pkg/gui/controllers/staging_controller.go +++ b/pkg/gui/controllers/staging_controller.go @@ -200,7 +200,8 @@ func (self *StagingController) applySelection(reverse bool) error { } if state.SelectingRange() { - state.SetLineSelectMode() + firstLine, _ := state.SelectedRange() + state.SelectLine(firstLine) } return nil diff --git a/pkg/integration/tests/commit/stage_range_of_lines.go b/pkg/integration/tests/commit/stage_range_of_lines.go index 8c7b9c8a6..ef63b4838 100644 --- a/pkg/integration/tests/commit/stage_range_of_lines.go +++ b/pkg/integration/tests/commit/stage_range_of_lines.go @@ -34,9 +34,6 @@ var StageRangeOfLines = NewIntegrationTest(NewIntegrationTestArgs{ Content( Contains(" 3rd\n 4th\n-5th\n+5th changed\n 6th"), ). - /* EXPECTED: SelectedLine(Equals("-5th")) - ACTUAL */ - SelectedLine(Equals("+5th changed")) }, })