-
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
Take wrapping into account when expanding wordwise selections #17170
Conversation
This comment has been minimized.
This comment has been minimized.
// Prevent wrapping to the previous line if the selection begins on whitespace | ||
if (isControlChar) | ||
{ | ||
break; | ||
} |
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.
...but should we? If I print a b
and it force-wraps in the middle, shouldn't I be able to select all 4 spaces with a double click?
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.
Eh, I didn't want to revisit too many of the decisions from the previous code.
But also, this is what prevents us from selecting the entire text buffer when you double-click an empty space lmao
VERIFY_IS_TRUE(_buffer->GetRowByOffset(0).WasWrapForced()); | ||
VERIFY_IS_FALSE(_buffer->GetRowByOffset(1).WasWrapForced()); | ||
// GH#780 See the comment in WriteLinesToBuffer | ||
// VERIFY_IS_FALSE(_buffer->GetRowByOffset(2).WasWrapForced()); |
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.
// VERIFY_IS_FALSE(_buffer->GetRowByOffset(2).WasWrapForced()); |
dead 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.
No, pertinent to the comment above it
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.
Good
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.
Thanks
Closes #17165