-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Show clipboard contents in multiple line paste warning dialog #8744
Conversation
@@ -405,8 +405,8 @@ | |||
<data name="MultiLinePasteDialog.CloseButtonText" xml:space="preserve"> | |||
<value>Cancel</value> | |||
</data> | |||
<data name="MultiLinePasteDialog.Content" xml:space="preserve"> | |||
<value>You are about to paste text that contains multiple lines. If you paste this text into your shell, it may result in the unexpected execution of commands. Do you wish to continue?</value> | |||
<data name="MultiLineWarningText.Text" xml:space="preserve"> |
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 wish we didn't have to change the key for this. I know why we have to, but this will trigger a re-localization for a string that is almost exactly the same.
Should we introduce a limit, say 10 lines, after which we insert a |
Hm I feel like since we have the scrollbar we don't need to truncate the content (and if the user does not want to see their large pastes they could just use the setting to disable multi line paste warnings) |
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.
okay yea this seems good to me
</TextBlock> | ||
<ScrollViewer | ||
Margin="0,8,0,0" | ||
x:Name="ClipboardContentScrollViewer" |
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.
We don't need to name infrastructural components unless we refer to them in code 😄
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.
We actually refer to this one! To reset the scroll offset (the scroll offset does not reset automatically in between calls to open the dialog)
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.
love it!
Hello @DHowett! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
🎉 Handy links: |
…oft#8744) When we display a dialog to warn the user that they are doing a multi-line paste, we show the clipboard contents The contents are shown in a scroll viewer with a fixed maximum height. Closes microsoft#7997
When we display a dialog to warn the user that they are doing a
multi-line paste, we show the clipboard contents
The contents are shown in a scroll viewer with a fixed maximum height.
Closes #7997