-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Update TextEdit selection when inserting line #31496
Update TextEdit selection when inserting line #31496
Conversation
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.
Rather then adjusting the selection, it should deselect the text as this method moves the caret to the line. Which could be miles away.
It makes sense to make it consistent. But what about just not moving the caret either? I don't really see the purpose of changing anything in the current selection or cursor while disabling a warning. |
Yeah that works too, looks like it's only used for disabling warnings and it's not exposed to scripting, so no compatibility breakage. |
Cool, I'll do it this way then. |
5fa16cc
to
bc839ed
Compare
@Paulb23 Changes are done. Now the cursor is adjusted the same way as the selection. |
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.
LGTM.
Thanks! |
Selection columns could be invalid after inserting a line in TextEdit (e.g adding warning ignore hints). Now the line indices will be updated when needed, in order to grow or move the selection depending on the case.
Fixes #31458