Skip to content

In formatter, get lineAction directly from applyRuleEdits#21245

Merged
1 commit merged into
masterfrom
formatObjectBindingPattern
Jan 18, 2018
Merged

In formatter, get lineAction directly from applyRuleEdits#21245
1 commit merged into
masterfrom
formatObjectBindingPattern

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jan 17, 2018

Fixes #20508

processPair was trying to calculate lineAction based only on rule.action.
But only applyRuleEdits knows whether a line was actually added/deleted; in this case there was a RuleAction.Space rule that happened to do nothing, but processPair was assuming that it had removed a line, which meant that we didn't try to correct the indentation for the line with x,.

@ghost ghost requested review from aozgaa, armanio123 and uniqueiniquity January 17, 2018 23:16
@ghost ghost merged commit 7392230 into master Jan 18, 2018
@ghost ghost deleted the formatObjectBindingPattern branch January 18, 2018 00:02
@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant