-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Make whitespace trimming in block selection configurable #9807
Conversation
This comment has been minimized.
This comment has been minimized.
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.
Looks good to me but...
Documentation updated - not yet
We definitely need to file the doc bug or make sure @cinnamon-msft is ready for this.
Thanks!. Issuing it now - waited for initial approval. |
The documentation was added here: MicrosoftDocs/terminal#313 |
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.
Looks great! Thanks!
src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
Outdated
Show resolved
Hide resolved
// GH#9706: Trimming of trailing white-spaces in block selection is configurable. | ||
const auto includeCRLF = !singleLine || _blockSelection; | ||
const auto trimTrailingWhitespace = !singleLine && (!_blockSelection || _trimBlockSelection); | ||
const auto formatWrappedRows = _blockSelection; | ||
return _buffer->GetText(includeCRLF, trimTrailingWhitespace, selectionRects, GetAttributeColors, formatWrappedRows); |
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.
THIS LOOKS SO MUCH BETTER. THANK YOU
Hello @carlos-zamora! Because this pull request has the Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 8 hours, a condition that will be fulfilled in about 1 hour 51 minutes. No worries though, I will be back when the time is right! 😉 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 (
|
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.
Blocking so that we have space for a discussion about where the setting belongs (which level), naming, phrasing, etc.
2 signoffs is dangerously close to "it merges without us agreeing on stuff" ;P
@DHowett - requested review just to ensure that the bot removes "Needs-Author-Feedback". |
I'll kick off the discussion then 😊
I think this makes sense as a global. It's next to
I actually really like this name. It's short. It's clear that it only impacts block selection. My only complaint could be that the trimming only happens when we copy, not when we select. But I think that's me just grasping at straws to find something wrong with it haha. And I honestly think people won't think of the setting in that way; docs, the schema description, and the SUI header should be more than enough to remove that ambiguity.
"Remove trailing white-spaces when copying text in rectangular selection to clipboard" Maybe change "rectangular" to "block". I'm mildly irritated by how long it is, but I'd rather see it be descriptive than not. And I think this is ok to be "negative", because "Keep trailing white-spaces..." isn't clear that the alternative is to remove them. But yeah, definitely want more input on this one. Miscellaneous design thoughtsWe could change this setting to |
I concur with all of @carlos-zamora's points and don't have anything further to add. |
It's been a week. So bump. |
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.
Yea this is super straightforward, I have no problems with this. /discussion
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.
Shopping around the new wording, then we'll merge. Thanks for the patience!
🎉 Handy links: |
PR Checklist
Detailed Description of the Pull Request / Additional comments
Added global flag named
trimBlockSelection
set tofalse
by default.The setting was added to Interactions menu of the SUI.