Disable warning about multi-line paste when brackted paste is on#9586
Conversation
Misspellings found, please review:
To accept these changes, run the following commands from this repository on this branch✏️ Contributor please read thisBy default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
See the 🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉 🗜️ If you see a bunch of garbage and it relates to a binary-ish string, please add a file path to the File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
|
|
|
||
| if (warnMultiLine) | ||
| { | ||
| const auto focusedTab = _GetFocusedTabImpl(); |
There was a problem hiding this comment.
This is awkward. I wish I can do this in the background thread. But If I do that, it just crashes. So I have to do it here. And the logic is kinda messed up.
There was a problem hiding this comment.
Probably due to the call to
if (_tabView.TabItems().IndexOf(_tabView.SelectedItem(), focusedIndex))Presumably that has to happen on the FG thread
There was a problem hiding this comment.
My first attempt is to do the check outside if (warnMultiLine || warnLargeText), which is much more streamlined. But it'll crash. So I have to do this inside if (warnMultiLine || warnLargeText) and double-check it after switching to FG thread.
|
|
||
| if (warnMultiLine) | ||
| { | ||
| const auto focusedTab = _GetFocusedTabImpl(); |
There was a problem hiding this comment.
Probably due to the call to
if (_tabView.TabItems().IndexOf(_tabView.SelectedItem(), focusedIndex))Presumably that has to happen on the FG thread
| ClipboardContentScrollViewer().ScrollToVerticalOffset(0); | ||
|
|
||
| ContentDialogResult warningResult; | ||
| ContentDialogResult warningResult = ContentDialogResult::Primary; |
There was a problem hiding this comment.
Curious, what was the default-constructed value for this ContentDialogResult. Did setting it to Primary change anything?
There was a problem hiding this comment.
The default-constructed value is garbage data, like an uninitialized integer. I had to make it "Primary" to make it not co_return directly. read the logic
There was a problem hiding this comment.
Indeed! It was uninitialized!
If you initialize it with {}, it will be whichever one matches 0
|
@msftbot merge this in 10 minutes |
|
Hello @DHowett! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
|
🎉 Handy links: |
Closes #7006