-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Should pasting newline with auto-indent move the cursor + inconsistencies when pasting newlines #86301
Labels
editor-autoindent
Editor auto indentation issues
javascript
JavaScript support issues
on-unit-test
polish
Cleanup and polish issue
typescript
Typescript support issues
under-discussion
Issue is under discussion for relevance, priority, approach
Comments
(Experimental duplicate detection) |
Auto Indent on Paste is based on indentation rules, which are not sound. You can currently disable this particular auto indent feature by setting |
rebornix
added
editor-autoindent
Editor auto indentation issues
polish
Cleanup and polish issue
labels
Dec 6, 2019
@rebornix I can try and work on it.
|
rebornix
added
the
under-discussion
Issue is under discussion for relevance, priority, approach
label
Nov 3, 2020
russelldavis
added a commit
to russelldavis/vscode
that referenced
this issue
May 19, 2023
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
russelldavis
added a commit
to russelldavis/vscode
that referenced
this issue
May 19, 2023
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
russelldavis
added a commit
to russelldavis/vscode
that referenced
this issue
May 22, 2023
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
russelldavis
added a commit
to russelldavis/vscode
that referenced
this issue
Jun 9, 2023
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
russelldavis
added a commit
to russelldavis/vscode
that referenced
this issue
Jul 18, 2023
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
russelldavis
added a commit
to russelldavis/vscode
that referenced
this issue
Sep 30, 2023
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
russelldavis
added a commit
to russelldavis/vscode
that referenced
this issue
Oct 2, 2023
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
russelldavis
added a commit
to russelldavis/vscode
that referenced
this issue
Oct 3, 2023
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
russelldavis
added a commit
to russelldavis/vscode
that referenced
this issue
Oct 7, 2023
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
russelldavis
added a commit
to russelldavis/vscode
that referenced
this issue
Oct 12, 2023
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
aiday-mar
added
javascript
JavaScript support issues
typescript
Typescript support issues
labels
Mar 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
editor-autoindent
Editor auto indentation issues
javascript
JavaScript support issues
on-unit-test
polish
Cleanup and polish issue
typescript
Typescript support issues
under-discussion
Issue is under discussion for relevance, priority, approach
Issue Type: Bug
Also when pasting content with a trailing newline, only pastes with 2+ lines (that isn't already correctly indented) end up indenting the last newline.
VS Code version: Code 1.40.2 (f359dd6, 2019-11-25T14:54:45.096Z)
OS version: Windows_NT x64 10.0.19033
The text was updated successfully, but these errors were encountered: