-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix(Diff View): Avoid exception on open #12028
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
Conversation
and clear search string on hide
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
@@ -375,6 +378,11 @@ private void SetFindInCommitFilesGitGrepVisibilityImpl(bool visible) | |||
// Adjust sizes "automatically" changed by visibility | |||
cboFindInCommitFilesGitGrep.Top = 0; | |||
} | |||
else if (_formFindInCommitFilesGitGrep?.Visible is false or null && cboFindInCommitFilesGitGrep.Text.Length > 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else if (_formFindInCommitFilesGitGrep?.Visible is false or null && cboFindInCommitFilesGitGrep.Text.Length > 0) | |
else if (_formFindInCommitFilesGitGrep?.Visible != true && cboFindInCommitFilesGitGrep.Text.Length > 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, must handle null too. See my comment below.
@@ -375,6 +378,11 @@ private void SetFindInCommitFilesGitGrepVisibilityImpl(bool visible) | |||
// Adjust sizes "automatically" changed by visibility | |||
cboFindInCommitFilesGitGrep.Top = 0; | |||
} | |||
else if (_formFindInCommitFilesGitGrep?.Visible is false or null && cboFindInCommitFilesGitGrep.Text.Length > 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer is not true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please explain what you mean...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change in the screenshot should have removed nullable only.
But I got confused by the inverse logic of "is not
".
It would have been clearer if the old code had been ?.IsEmpty is true or null
.
I have changed the condition for this PR to match the recent code style as requested. We can finish the discussion later and, perhaps, adapt those 5 occurrences.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should probably be is (false or null)
and is not true
is shorter. But Russkie commented on it and has done that before.
review comment
Fixes #12026
Proposed changes
Fixup FileStatusList:
BeginInvoke
too early)Screenshots
Before
N/A
Test methodology
Merge strategy
I agree that the maintainer squash merge this PR (if the commit message is clear).
✒️ I contribute this code under The Developer Certificate of Origin.