-
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
Add copyFormatting keybinding arg and array support #6004
Conversation
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment. |
shh bot, chill |
Urgh. Thanks. I'll get to this one today. |
48c7b0d
to
f2bfeda
Compare
@DHowett Latest commit tries to use the new Json Utils but I had some trouble. No longer builds. Could I get some help? |
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.
only nits remaining are on the string formatting! well done
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
🎉 Handy links: |
Summary of the Pull Request
Adds array support for the existing
copyFormatting
global setting. This allows users to define which formats they would specifically like to be copied. A boolean value is still accepted and is translated to the following:false
-->"none"
or[]
true
-->"all"
or["html", "rtf"]
This also adds
copyFormatting
as a keybinding arg forcopy
. As with the global setting, a boolean value and array value is accepted.References
#5212 - Spec for formatted copying
#2690 - disable html copy
PR Checklist
Detailed Description of the Pull Request / Additional comments
CopyFormat is a winrt enum where each accepted format is a flag. Currently accepted formats include
html
, andrtf
. A boolean value is accepted and converted.true
is a conjunction of all the formats.false
only includes plain text.For the global setting,
null
is not accepted. We already have a default value from before so no worries there.For the keybinding arg,
null
(the default value) means that we just do what the global arg says to do. Overall, thecopyFormatting
keybinding arg is an override of the global setting when using that keybinding.Validation Steps Performed
Validated behavior with every combination of values below:
copyFormatting
global: {true
,false
,[]
,["html"]
}copyFormatting
copy arg: {null
,true
,false
,[]
,[, "html"]
}