Skip to content

Fix auto indent when pasting lines that begin with a comment - #201421

Closed
Russell Davis (russelldavis) wants to merge 1 commit into
microsoft:mainfrom
russelldavis:fix-autoindent-with-first-line-comment
Closed

Russell Davis (russelldavis) wants to merge 1 commit into
microsoft:mainfrom
russelldavis:fix-autoindent-with-first-line-comment

Conversation

@russelldavis

Copy link
Copy Markdown
Contributor

Fixes #201420

The special handling for comments was originally added in 886f472 to fix #29753, but it had the side effect of causing #201420 -- preventing a desired auto indent in the majority of cases when pasting lines beginning with a comment (basically, all cases except multiline docblock style comments at the leftmost indentation level). That case has since been solved in a different way by e77b196, so removing this special handling gives us the best of both worlds.

The special handling for comments was originally added in 886f472
to fix microsoft#29753, but it had the side effect of preventing a desired auto
indent in the majority of cases when pasting lines beginning with a
comment (basically, all cases except multiline docblock style comments
at the leftmost indentation level). That case has since been solved in
a different way by e77b196, so removing this special handling gives us
the best of both worlds.
@dmitrivMS

Copy link
Copy Markdown
Collaborator

The linked issue has already been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autoindent on paste fails when first line of clipboard is a comment TypeScript - Indentation rules are not aware of Doc comments

3 participants