-
Notifications
You must be signed in to change notification settings - Fork 163
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 navigation to "Prev/Next Change" for built-in Diff viewer #616
Comments
SourceGit provides support for external comparison tools, which means that in this project, the built-in comparison view will only implement some basic functions. As you mentioned above, this feature is also unnecessary until the entire file display feature is added, because |
I find it unfortunate to have to resort to external tools for this, when the built-in Diff is much more convenient for quick (re)viewing of changes. Having to popup an external tool takes extra time and disrupts the workflow - I would prefer to only use that for resolving merge conflicts. Viewing the whole file (#615) and being able to navigate quickly between changes would improve this tool a lot, IMHO. (Would you be willing to accept a PR for this, eventually?) |
I don't see why the navigation buttons shouldn't be available regardless of whether the entire file is displayed or not. Navigation could happen within the lines that are loaded. This feature, combined with the addition of keyboard shortcuts to accept or reject a block of changes, would make keyboard operation easier. |
Because the context line number is not large enough, go to next/prev change just like page down/up |
Instead of simply scrolling through changes, I believe the optimal approach would be to automatically select the next difference block upon navigation. This way, I can utilize keyboard shortcuts to discard or accept changes efficiently, ensuring smooth commit review even when the context is limited. This keyboard-centric approach streamlines the entire process and significantly enhances productivity. |
I agree - keyboard shortcuts for navigating up/dn to each change (instead of just PgUp/Dn) and for stage/discard would be a great workflow. |
Signed-off-by: leo <longshuang@msn.cn>
Signed-off-by: leo <longshuang@msn.cn>
Done. You can download latest CI build from Github Action |
…iff view (sourcegit-scm#616) Signed-off-by: leo <longshuang@msn.cn> (cherry picked from commit 134c710) # Conflicts: # src/Views/DiffView.axaml # src/Views/TextDiffView.axaml.cs
…iff view (sourcegit-scm#616) Signed-off-by: leo <longshuang@msn.cn> (cherry picked from commit 134c710) # Conflicts: # src/Views/DiffView.axaml # src/Views/TextDiffView.axaml.cs
@dougcunha Thanks for your comments earlier. See suggestion #717 for continued discussion - my alternative implementation is currently in PR #703. |
…iff view (sourcegit-scm#616) Signed-off-by: leo <longshuang@msn.cn> (cherry picked from commit 134c710) # Conflicts: # src/Views/DiffView.axaml # src/Views/TextDiffView.axaml.cs
…iff view (sourcegit-scm#616) Signed-off-by: leo <longshuang@msn.cn> (cherry picked from commit 134c710) # Conflicts: # src/Views/DiffView.axaml # src/Views/TextDiffView.axaml.cs
…717) (#703) * Corrected misspelled local variable nextHigh(t)light * Implemented change-block navigation * Modified behavior of the Prev/Next Change buttons in DiffView toolbar. * Well-defined change-blocks are pre-calculated and can be navigated between. * Current change-block is highlighted in the Diff panel(s). * Prev/next at start/end of range (re-)scrolls to first/last change-block (I.e when unset, or already at first/last change-block, or at the only one.) * Current change-block is unset in RefreshContent(). * Added safeguards for edge cases * Added indicator of current/total change-blocks in DiffView toolbar * Added new Icon and String (en-US) for Highlighted Diff Navigation * Added Preference and ToggleButton for diff navigation style
The built-in Diff viewer has no way to navigate quickly to the previous or next change (or hunk). This would be very helpful, especially if also implementing #615.
I suggest adding icon-toggles (up-down arrows) for "Prev(ious)/Next Change" (with corresponding hotkeys) in the top (mini-)bar of the built-in Diff viewer.
For reference, SmartGit and GitKraken has this feature, and it's also very common in standalone diff/merge vievers like P4Merge, Meld etc.
The text was updated successfully, but these errors were encountered: