You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Should pasting newline with auto-indent move the cursor + inconsistencies when pasting newlines #86301
Expected: The newline is indented and your cursor starts at the right indent position
() => {
() => {
a
}
<- Cursor is here
}
Actual: The newline is indented but your cursor stays at the beginning of the line
() => {
() => {
a
}
<- Cursor is here <indent after>
}
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.
() => {
() => {}
<- Cursor is here, no indent
}
() => {
() => {
}
<- Cursor is here <indent after>
}
() => {
() => {
}
<- Cursor is here, no indent (as pasted content already had correct indent)
}
VS Code version: Code 1.40.2 (f359dd6, 2019-11-25T14:54:45.096Z)
OS version: Windows_NT x64 10.0.19033
Auto Indent on Paste is based on indentation rules, which are not sound. You can currently disable this particular auto indent feature by setting editor.autoIndent: advanced ./
Activity
vscodebot commentedon Dec 4, 2019
(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
rebornix commentedon Dec 6, 2019
Auto Indent on Paste is based on indentation rules, which are not sound. You can currently disable this particular auto indent feature by setting
editor.autoIndent: advanced./jzyrobert commentedon Dec 6, 2019
Peng Lyu (@rebornix) I can try and work on it.
What do you think is the more consistent way?
Fix indentation issues when pasting with trailing newline
Fix indentation issues when pasting with trailing newline
Fix indentation issues when pasting with trailing newline
Fix indentation issues when pasting with trailing newline
Fix indentation issues when pasting with trailing newline
Fix indentation issues when pasting with trailing newline
Fix indentation issues when pasting with trailing newline
Fix indentation issues when pasting with trailing newline
Fix indentation issues when pasting with trailing newline
Fix indentation issues when pasting with trailing newline