mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
Fix scrolling back when dragging a commit
During auto-scrolling, turn off the automatic scroll-to-make-the-selected-item-visible functionality of PostRefreshUpdate.
This commit is contained in:
parent
c8d610cb58
commit
35753fd042
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue