Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor override has inconsistent options handling between normal editor and untitled/diff #127314

Closed
bpasero opened this issue Jun 28, 2021 · 0 comments
Assignees
Labels
debt Code quality issues insiders-released Patch has been released in VS Code Insiders workbench-editor-resolver Issues resolving the editor inputs

Comments

@bpasero
Copy link
Member

bpasero commented Jun 28, 2021

Uncomment these 2 lines to see test failures:

// assert.strictEqual(pane.group.isSticky(pane.input), true); https://github.com/microsoft/vscode/issues/127314

// assert.strictEqual(pane.group.isSticky(pane.input), true); https://github.com/microsoft/vscode/issues/127314

It looks like the options that are passed into the editor override service are only preserved when returning a normal editor input but not for diff or untitled:

options = inputWithOptions.options ?? options;

vs

const inputWithOptions = selectedEditor.createDiffEditorInput(editor, group);

and

const inputWithOptions = selectedEditor.createUntitledEditorInput(editor, group);

@bpasero bpasero added debt Code quality issues workbench-editor-resolver Issues resolving the editor inputs labels Jun 28, 2021
bpasero added a commit that referenced this issue Jun 28, 2021
bpasero added a commit that referenced this issue Jun 28, 2021
* editor service cleanup

* add some more extensive `openEditor` test

* add commented out test for #127314

* more tests for corner cases

* tests for openEditors() too
@github-actions github-actions bot locked and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues insiders-released Patch has been released in VS Code Insiders workbench-editor-resolver Issues resolving the editor inputs
Projects
None yet
Development

No branches or pull requests

3 participants
@bpasero @lramos15 and others