-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Move line up drops a line #29457
Comments
It's not a new issue actually, which means it has nothing to do with auto indent. The root cause is we won't expand the selection if the endColumn of the selection is 1. cc @alexandrudima |
@rebornix In the gif I have shared the line reading |
@jrieken make sense, I'm convinced :) |
Revisit this issue as my previous fix for this issue actually leads to #29713 and #29682 . The underlying problem of this issue is how we handle the empty ending line
We have this behavior from the very beginning. It helps a lot as when users select several lines, they may happen to select the beginning of one line below. My first fix is if you have auto indent, then I'll always see this line as part of the moving block, which is a breaking change. Now I reverted this change and the new way to mitigate this issue is
It's not a clean fix but as our Move Lines command is stateless, this fix solves most of the problem. Let me know if you have better ideas on this and look forward to feedback of all of you. |
…paces are shrinked due to auto indent.
See attached recording and sample snippets
whitespaceCharacter
-array with an empty selection on its last liineThe text was updated successfully, but these errors were encountered: