Skip to content

Enable { and } to change diff context size in branches and tags panels in diffing mode#5258

Open
stefanhaller wants to merge 1 commit intomasterfrom
change-diff-context-in-diffing-mode
Open

Enable { and } to change diff context size in branches and tags panels in diffing mode#5258
stefanhaller wants to merge 1 commit intomasterfrom
change-diff-context-in-diffing-mode

Conversation

@stefanhaller
Copy link
Collaborator

When looking at a diff in diffing mode in the branches or tags panels (e.g. after pressing W on a branch and then selecting a different branch to diff it against the first one) it wasn't possible to change the diff context size using { and }, or the rename threshold using ( and ).

Fixes #5254.

…s in diffing mode

Same for ( and ) to change the rename threshold.
@codacy-production
Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 443452a1 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (443452a) Report Missing Report Missing Report Missing
Head commit (1faf8c7) 59627 51968 87.16%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#5258) 12 12 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@stefanhaller
Copy link
Collaborator Author

BTW, I'm a little undecided whether the code complexity is worth it actually. Given that the commands show a toast saying what they did, I could also see us enabling the commands unconditionally everywhere. You could then change the diff context size while looking at the status panel, but why not? It would take affect the next time you view a diff.

@goyalyashpal
Copy link

Given that the commands show a toast saying what they did,

... actually, i stumbled upon a case where it didn't, though i cant recall it right away.

do u want me to try to find that again?

I could also see us enabling the commands unconditionally everywhere. You could then change the diff context size while looking at the status panel, but why not?

i thought it was supposed to be the case already since these keybinds are listed under the "global" heading?

@stefanhaller
Copy link
Collaborator Author

I could also see us enabling the commands unconditionally everywhere. You could then change the diff context size while looking at the status panel, but why not?

i thought it was supposed to be the case already since these keybinds are listed under the "global" heading?

No, they are listed but don't do anything when a panel is focused that doesn't show diffs.

An alternative would be to strike them through in that case, with a tooltip explaining why they aren't available, like we do for many other commands that are only conditionally available. But I don't think it's worth the effort, it's just fine to enable them always.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

{} change diff-context-size doesn't work in diff mode

2 participants