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
Added: Copy text without dismissing the selection #15552
Changes from 2 commits
1320f17
721a64f
68d4b9c
830bffe
0331c7e
5e75065
851ff24
dfee27b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -699,4 +699,12 @@ | |
<data name="SelectCommandPreviousCommandKey" xml:space="preserve"> | ||
<value>Select previous command</value> | ||
</data> | ||
</root> | ||
<data name="DismissSelectionCommandKey" xml:space="preserve"> | ||
<value>DismissSelectionCommandKey</value> | ||
<comment>DismissSelectionCommandKey</comment> | ||
</data> | ||
<data name="DismissSelectionFalseCommandKey" xml:space="preserve"> | ||
<value>DismissSelectionFalseCommandKey</value> | ||
<comment>DismissSelectionFalseCommandKey</comment> | ||
</data> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Building off of my comments in ActionArgs.cpp. If you go with my suggestion of |
||
</root> | ||
carlos-zamora marked this conversation as resolved.
Show resolved
Hide resolved
|
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.
You're going to have to move this somewhere else in this method. So, here's how this function works:
singleLine: true
--> the command palette displays the action as "Copy text as a single line"copyFormatting
is set, we append "copyFormatting: "Honestly, the easiest approach I recommend is appending "dismissSelection: false" to the string if
dismissSelection: false
.@DHowett @nguyen-dows Thoughts? Y'all are generally good at wordsmithing stuff.
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 truth is that I have programmed it a bit by intuition. Where do these strings appear/be used for? I haven't had much time to investigate. I guess I'll wait for others to comment on this.
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 problem! haha
GenerateName()
spits out the localized string version of the action. These get displayed in the command palette and in the actions page of the settings UI.