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
Paste into editor with format on paste removes pasted word #48006
So far, it looks like the tree walking part of the formatter doesn't correctly increment the scanner, so the end-of-tree section of the code ends up formatting () instead of ("bar".
Now I have to go understand how the tree walk works.
Activity
hediet commentedon Feb 21, 2022
I cannot reproduce this on windows. Up for a quick meeting?
bpasero commentedon Feb 21, 2022
Yes
bpasero commentedon Feb 21, 2022
Henning figured out that this is a bug in the typescript formatter and it reproduces as simple as with this:
When you try to paste the
aaaainto the second location.mjbvz commentedon Feb 23, 2022
Here's the
formatrequest I see pasting into the first argument in the above example:6 remaining items
sandersn commentedon Apr 29, 2022
So far, it looks like the tree walking part of the formatter doesn't correctly increment the scanner, so the end-of-tree section of the code ends up formatting
()instead of("bar".Now I have to go understand how the tree walk works.
sandersn commentedon Apr 29, 2022
Broken in #46875, which is not surprising since that PR adds the end-of-tree section.
Edit: The tree walk was probably already incorrect, it's just the new end-of-tree code relies on it being correct.
Fix formatter's processChildNodes
Fix formatter's processChildNodes (#48921)
DarinDev1000 commentedon Jul 11, 2022
I also have this issue on mac