Skip to content

moveDownCommit and moveUpCommit should apply scrollOffMargin #5244

Description

@Axlefublr

Describe the bug

Moving a commit during a rebase does not keep it in view. Only once I do ↓↑ does the view update again.
So I need to either guess how many hotkey presses I need to do, or do an awkward ↓↑ every so often so that I can see 👀

compressed.mp4

To Reproduce

Start a rebase with e, and try to move a commit up or down, until it's out of view. You can now continue moving the commit despite it being not visible. Try holding your hotkey to move the commit — once you ↓↑ afterwards, you'll see that the commit is all the way at the top / very very down, and you were never the wiser!

Expected behavior

After executing moveUpCommit or moveDownCommit, the user configured scrollOffMargin should be applied, to keep the commit in view.
When there are multiple commits selected, and they don't all fit into the view, do some sort of best effort basis behavior that isn't just “keep the view static”

Version info:

commit=80dd695d7, build date=20260109.023340, build source=unknown, version=v0.58.0.80dd695d7, os=linux, arch=amd64, git version=2.52.0

Terminal info:

Foot terminal.

foot version: 1.25.0 +pgo +ime +graphemes -assertions

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions