Adding an import via quick fix scrolls the editor
- use autofolding of imports
"editor.foldingImportsByDefault": true. - use a type that is not imported in a TS file
- use quick fix to add the import
- the editor scrolls to an incorrect position. I think this is a recent regression, because I've been using both import folding and quick fix for imports since quite a while... maybe starting with the last stable.
https://user-images.githubusercontent.com/5047891/191502148-c0dc8dbf-26b1-4dc8-ab1e-975462212a66.mp4
Version: 1.72.0-insider Commit: 333754f29b719f605904f072b13c054c2231b9bd Date: 2022-09-21T05:40:07.654Z Electron: 19.0.17 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Darwin arm64 21.6.0 Sandboxed: Yes
Un-assigning myself as I don't think this cause by something the JS/TS extension itself is doing
@mjbvz who owns the quick fix UI now?
@alexdima I own the UI. However it looks like scrolling here happen when the edit from the quick fix is applied. That's why I unassigned myself
It also unfolds if you do "Organize Imports", so seems like any action related with imports unfolds even though setting is "editor.foldingImportsByDefault": true
The root cause appears to be the folding ranges change and end up calling editor.setHiddenAreas. That one does not attempt to maintain the viewport stable in any way.
@alexdima @mjbvz this issue still exists: https://github.com/microsoft/vscode/issues/168523