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
Formatting a selection with trailing whitespace in a comment doesn't work #5200
const a =0; // a comment without a trailing spaceconst b =0; // a comment with a trailing space -> voidf() {
}
Selecting the second line here and running "Format Selection" results in the function f also being formatted. Like #5169 + #5198 part of the issue here is that we're not minimizing the format edits properly, and the other part is that we fall back to the full document.
The fix for #5169 (https://dart-review.googlesource.com/c/sdk/+/377422) will prevent the full document being formatted, but doesn't address the real issue, which is that the selection also wouldn't be formatted. This is likely another hole in the algorithm for minimizing edits.
changed the title [-]Formatting a selection with trailing whitespace after a comment doesn't work[/-][+]Formatting a selection with trailing whitespace in a comment doesn't work[/+]on Jul 24, 2024
Activity
[-]Formatting a selection with trailing whitespace after a comment doesn't work[/-][+]Formatting a selection with trailing whitespace in a comment doesn't work[/+][analysis_server] Handle minimizing formatting edits that remove trai…
DanTup commentedon Jul 25, 2024
Fixed by dart-lang/sdk@b8c5f81, ships in a future Dart/Flutter SDK.