You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add the ability to scroll the diff viewport with J and K while the file view is focused #220
I'm really enjoying revdiff, thanks for making it!
I often find myself wanting to scroll the diff viewport while the file view has focus. This behavior exists in lazygit today, and it's quite nice to be able to change which file is selected, then scroll its diff viewport without needing to explicitly tab over to the file view. So the proposal here is to bind shift + J and shift + K to scroll down and up on the diff viewport while the file view has focus.
I've made this change locally and would be happy to open a PR if you're interested in contributions.
yep, interested. J/K are free and lazygit parity makes sense, go ahead with the PR.
one thing to sort out in the PR: the keymap is global (key resolves to one action, panes just interpret it differently in handleTreeAction / handleDiffAction), so whatever J/K map to is also reachable when the diff pane is focused. Decide what they do there too, scrolling the diff is the obvious consistent choice. There's already a pure-scroll primitive you can reuse, scrollDiffViewportBy in app/ui/mouse.go.
also pls add it as default bindings in app/keymap (with help/docs entries) so it's configurable, and add tests for the tree-focused path.
Activity
umputun commentedon Jun 5, 2026
yep, interested.
J/Kare free and lazygit parity makes sense, go ahead with the PR.one thing to sort out in the PR: the keymap is global (key resolves to one action, panes just interpret it differently in
handleTreeAction/handleDiffAction), so whateverJ/Kmap to is also reachable when the diff pane is focused. Decide what they do there too, scrolling the diff is the obvious consistent choice. There's already a pure-scroll primitive you can reuse,scrollDiffViewportByinapp/ui/mouse.go.also pls add it as default bindings in
app/keymap(with help/docs entries) so it's configurable, and add tests for the tree-focused path.steve-mackinnon commentedon Jun 5, 2026
Sounds great, thanks for the detail. I'll try to have this up later today.
steve-mackinnon commentedon Jun 6, 2026
PR opened here: #224
umputun commentedon Jun 7, 2026
merged in #224.
J/Know scroll the diff viewport while the tree has focus, matching lazygit. Thx for the clean PR.