-
Notifications
You must be signed in to change notification settings - Fork 31k
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
Pasting code destroys indentation of both the pasted code and nearby lines #33760
Comments
I'm also seeing this on:
IIRC, before upgrading VSCode to 1.15.1, this type of operation had worked flawlessly. |
@wittlesouth @codingthat This is indeed something that shipped with 1.15. It can be turned off via |
Thank you so much @alexandrudima , that works great. This was really annoying until you provided a workaround. :) |
For what is worth, I am seeing destructive behaviour on paste even with |
I put |
This is due to the limited architecture (regex based indentation rules and only support limited code styles), we may want to consider using formatters if they exist for indenation adjustment (if interested, we can discuss in #19847). For this particular issue, if the indentation rules are leading to more trouble than having no auto indent, you can set |
Fixes microsoft#85781 Fixes microsoft#147223 Fixes microsoft#33760 Fixes microsoft#65614 Fixes microsoft#86301 (Some of the issues above were closed as being limitations of the regex based indentation rules, but this change is able to fix them.) Note that ReindentSelectedLinesAction already does the same thing as this fix (which is what inspired it -- I noticed that running Reindent Selected Lines on the equivalent code didn't have the same issues): see https://github.com/microsoft/vscode/blob/6cbd9e8f3c5a59c5b1170aac8f2b5e9b0b4edfee/src/vs/editor/contrib/indentation/browser/indentation.ts#L390-L392
Fixes microsoft#85781 Fixes microsoft#147223 Fixes microsoft#33760 Fixes microsoft#65614 Fixes microsoft#86301 (Some of the issues above were closed as being limitations of the regex based indentation rules, but this change is able to fix them.) Note that ReindentSelectedLinesAction already does the same thing as this fix (which is what inspired it -- I noticed that running Reindent Selected Lines in the same scenarios didn't have the same issues): see https://github.com/microsoft/vscode/blob/6cbd9e8f3c5a59c5b1170aac8f2b5e9b0b4edfee/src/vs/editor/contrib/indentation/browser/indentation.ts#L390-L392
Fixes microsoft#85781 Fixes microsoft#147223 Fixes microsoft#33760 Fixes microsoft#65614 Fixes microsoft#86301 (Some of the issues above were closed as being limitations of the regex based indentation rules, but this change is able to fix them.) Note that ReindentSelectedLinesAction already does the same thing as this fix (which is what inspired it -- I noticed that running Reindent Selected Lines on the equivalent code didn't have the same issues): see https://github.com/microsoft/vscode/blob/6cbd9e8f3c5a59c5b1170aac8f2b5e9b0b4edfee/src/vs/editor/contrib/indentation/browser/indentation.ts#L390-L392
Fixes microsoft#85781 Fixes microsoft#147223 Fixes microsoft#33760 Fixes microsoft#65614 Fixes microsoft#86301 (Some of the issues above were closed as being limitations of the regex based indentation rules, but this change is able to fix them.) Note that ReindentSelectedLinesAction already does the same thing as this fix (which is what inspired it -- I noticed that running Reindent Selected Lines on the equivalent code didn't have the same issues): see https://github.com/microsoft/vscode/blob/6cbd9e8f3c5a59c5b1170aac8f2b5e9b0b4edfee/src/vs/editor/contrib/indentation/browser/indentation.ts#L390-L392
Fixes microsoft#85781 Fixes microsoft#147223 Fixes microsoft#33760 Fixes microsoft#65614 Fixes microsoft#86301 (Some of the issues above were closed as being limitations of the regex based indentation rules, but this change is able to fix them.) Note that ReindentSelectedLinesAction already does the same thing as this fix (which is what inspired it -- I noticed that running Reindent Selected Lines on the equivalent code didn't have the same issues): see https://github.com/microsoft/vscode/blob/6cbd9e8f3c5a59c5b1170aac8f2b5e9b0b4edfee/src/vs/editor/contrib/indentation/browser/indentation.ts#L390-L392
Fixes microsoft#85781 Fixes microsoft#147223 Fixes microsoft#33760 Fixes microsoft#65614 Fixes microsoft#86301 (Some of the issues above were closed as being limitations of the regex based indentation rules, but this change is able to fix them.) Note that ReindentSelectedLinesAction already does the same thing as this fix (which is what inspired it -- I noticed that running Reindent Selected Lines on the equivalent code didn't have the same issues): see https://github.com/microsoft/vscode/blob/6cbd9e8f3c5a59c5b1170aac8f2b5e9b0b4edfee/src/vs/editor/contrib/indentation/browser/indentation.ts#L390-L392
Fixes microsoft#85781 Fixes microsoft#147223 Fixes microsoft#33760 Fixes microsoft#65614 Fixes microsoft#86301 (Some of the issues above were closed as being limitations of the regex based indentation rules, but this change is able to fix them.) Note that ReindentSelectedLinesAction already does the same thing as this fix (which is what inspired it -- I noticed that running Reindent Selected Lines on the equivalent code didn't have the same issues): see https://github.com/microsoft/vscode/blob/6cbd9e8f3c5a59c5b1170aac8f2b5e9b0b4edfee/src/vs/editor/contrib/indentation/browser/indentation.ts#L390-L392
Fixes microsoft#85781 Fixes microsoft#147223 Fixes microsoft#33760 Fixes microsoft#65614 Fixes microsoft#86301 (Some of the issues above were closed as being limitations of the regex based indentation rules, but this change is able to fix them.) Note that ReindentSelectedLinesAction already does the same thing as this fix (which is what inspired it -- I noticed that running Reindent Selected Lines on the equivalent code didn't have the same issues): see https://github.com/microsoft/vscode/blob/6cbd9e8f3c5a59c5b1170aac8f2b5e9b0b4edfee/src/vs/editor/contrib/indentation/browser/indentation.ts#L390-L392
Fixes microsoft#85781 Fixes microsoft#147223 Fixes microsoft#33760 Fixes microsoft#65614 Fixes microsoft#86301 (Some of the issues above were closed as being limitations of the regex based indentation rules, but this change is able to fix them.) Note that ReindentSelectedLinesAction already does the same thing as this fix (which is what inspired it -- I noticed that running Reindent Selected Lines on the equivalent code didn't have the same issues): see https://github.com/microsoft/vscode/blob/6cbd9e8f3c5a59c5b1170aac8f2b5e9b0b4edfee/src/vs/editor/contrib/indentation/browser/indentation.ts#L390-L392
Fixes microsoft#85781 Fixes microsoft#147223 Fixes microsoft#33760 Fixes microsoft#65614 Fixes microsoft#86301 (Some of the issues above were closed as being limitations of the regex based indentation rules, but this change is able to fix them.) Note that ReindentSelectedLinesAction already does the same thing as this fix (which is what inspired it -- I noticed that running Reindent Selected Lines on the equivalent code didn't have the same issues): see https://github.com/microsoft/vscode/blob/6cbd9e8f3c5a59c5b1170aac8f2b5e9b0b4edfee/src/vs/editor/contrib/indentation/browser/indentation.ts#L390-L392
Steps to Reproduce:
Reproduces without extensions: Yes/No
The text was updated successfully, but these errors were encountered: