-
Notifications
You must be signed in to change notification settings - Fork 205
Auto-select first file for DiffView, whenever context is set or changed #1019
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
Labels
enhancement
New feature or request
Comments
Thanks, I contributed to the discussion in #754. This feature is oft-requested and could be implemented as an optional one (via Preferences). |
love-linger
added a commit
that referenced
this issue
Feb 25, 2025
…n/branch compare panel (#1019) Signed-off-by: leo <[email protected]>
love-linger
added a commit
that referenced
this issue
Feb 25, 2025
) Signed-off-by: leo <[email protected]>
Awesome, thanks a lot! 🥳 Comments after testing:
|
(And the way this is implemented, it could easily be made an optional (by Preference) feature, if desired, in a future update.) 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is an unnecessary click whenever the "Select file to view changes" (
DiffView
) panel is/becomes visible and/or the selected context is changed.It would be much preferable to always auto-select the first file (diff) from the list (whenever there is no active selection already), both on entering/activating the diff panel and when changing its selected context.
(NOTE: This means theText.Diff.Welcome
string should be changed from "Select file to view changes" to "No changes available" or similar, since it would only be shown if the file list is empty.)This sort of auto-selection is what we're used to from other tools (Plastic SCM, GitHub Desktop, Fork, Git Extensions, Tower, Sourcetree etc).
All the 5 DiffView instances would benefit from auto-selection:
RevisionCompare
page in HISTORY view (i.e when exactly 2 commits are multi-selected).In the LOCAL CHANGES view - auto-select from non-empty list of UNSTAGED or STAGED (in whatever order would make more sense).(NOTE: Should also auto-select the first stash when entering!)Related:
When going back from multi-selection to single-selection in HISTORY view, the previously active tab-link-page (INFORMATION / CHANGES / FILES) should be preserved, instead of reverting to the first tab-link-page (INFORMATION) !
The text was updated successfully, but these errors were encountered: