Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add buttons to hunk headers in diff view to allow the user to see more context #1352

Open
patryklech opened this issue Dec 8, 2021 · 2 comments

Comments

@patryklech
Copy link

In the diff viewer, expanding the visible scope of a hunk requires dragging the header up or down, which is tedious (small mouse click target, clunky over a slower VNC).

It would be useful to have a pair of buttons displayed on the hunk header, allowing the user to see, say, 20 or 50 more (configurable number of?) lines above the header and below the header. And another pair of buttons to fully expand the text above the header and below the header.

See ReviewBoard for an example: here the hunk header features one button, which adds 20 more lines to the visible extent of the text, and another button to show all intervening lines between the current hunk and the previous or next one.

I do realize there currently exists a "Show entire file/Show only modified hunks" button on the hunk header, but it would be nice to have something in between: show "a bit more", and show everything there is between this hunk and the previous one, or this one and the next one.

@srbs
Copy link

srbs commented Dec 8, 2021

Instead of dragging the header up or down, you can double click it to show 10 more lines.

@patryklech
Copy link
Author

patryklech commented Dec 9, 2021

Instead of dragging the header up or down, you can double click it to show 10 more lines.

Ah, yes, indeed! Thanks for letting me know! I tried double-clicking on a hunk header before, but the interface is a bit unintuitive: you need to align the mouse with the top or bottom edge of the hunk header (so the mouse pointer changes to an up-down arrow) and then double-click. Sublime Merge does indeed show 10 more lines from the visible hunk. But it also selects text words which happen to be under the mouse pointer when you double-clicked, which is iffy. I'm on Linux build 2059.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants