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
Regression: JavaScript Indentation drifts on paste #36294
Select a section of javascript with indentation including a newline
Paste
Reproduces without extensions: Yes
Reproduces in insiders: Yes 1.18 (989c400)
Previously, the indention was as expected on paste. My editor.formatOnPaste is explicitly set to false in my user settings. A basic rule of thumb seems to apply that selecting a text range and pasting once should be a noop. Is there something I'm missing or a new setting I need to disable?
UPDATE: it's worth nothing that the same indentation creep problem does not apply to lines within the same block
#36294, #29896, #38833 share the same root cause: empty lines are not handled gracefully. I pushed a fix which makes this specific case work but it may not work for all cases ;)
Activity
mjbvz commentedon Nov 15, 2017
Patrick Hulce (@patrickhulce) Can you please share some source code that reproduces this issue
patrickhulce commentedon Nov 15, 2017
sure Matt Bierner (@mjbvz), here's a sample I was just able to reproduce with a screenshot for selection emphasis
Code as text
Mitigate #29896, #36294.
rebornix commentedon Nov 28, 2017
#36294, #29896, #38833 share the same root cause: empty lines are not handled gracefully. I pushed a fix which makes this specific case work but it may not work for all cases ;)