diff --git a/pkg/gui/controllers/local_commits_controller.go b/pkg/gui/controllers/local_commits_controller.go index 0a02e7398..9407e3dee 100644 --- a/pkg/gui/controllers/local_commits_controller.go +++ b/pkg/gui/controllers/local_commits_controller.go @@ -191,7 +191,7 @@ func (self *LocalCommitsController) handleCommitDrag(opts gocui.ViewMouseBinding self.commitDrag.hasMoved = true if self.updateCommitDragInsertion(opts.Y) { - self.c.PostRefreshUpdate(self.context()) + self.c.PostRefreshUpdateKeepingScrollPosition(self.context()) } originY := self.context().GetView().OriginY() self.dragAutoscroller.Update(opts.Y - originY) diff --git a/pkg/integration/tests/interactive_rebase/drag_to_reorder_with_autoscroll.go b/pkg/integration/tests/interactive_rebase/drag_to_reorder_with_autoscroll.go index 6d281aa06..fdfdb8bc8 100644 --- a/pkg/integration/tests/interactive_rebase/drag_to_reorder_with_autoscroll.go +++ b/pkg/integration/tests/interactive_rebase/drag_to_reorder_with_autoscroll.go @@ -27,12 +27,8 @@ var DragToReorderWithAutoscroll = NewIntegrationTest(NewIntegrationTestArgs{ OriginYAtLeast(3). // Move the mouse back into the viewport MouseMove(1, 1). - /* EXPECTED: // This keeps the scroll as it was OriginYAtLeast(3). - ACTUAL: */ - // This snaps back to reveal the original commit - OriginY(0). MouseRelease(). SelectedLines( Contains("commit-40"),