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

Decoration types break when removing the first (original) folder from a multi-folder workspace #34004

Closed
ArtemGovorov opened this issue Sep 8, 2017 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug extension-host Extension host issues verified Verification succeeded workbench-multiroot Multi-root (multiple folders) issues

Comments

@ArtemGovorov
Copy link
Contributor

ArtemGovorov commented Sep 8, 2017

  • VSCode Version: Version 1.17.0-insider (1.17.0-insider) ac167c4
  • OS Version: macOS 10.12

Steps to Reproduce:

  1. Create a simple extension with the code below:
exports.activate = context => {

  const vscode = require('vscode');
  const red = window.createTextEditorDecorationType({
    isWholeLine: true,
    backgroundColor: 'red'
  });
  const green = window.createTextEditorDecorationType({
    isWholeLine: true,
    backgroundColor: 'green'
  });

  window.activeTextEditor.setDecorations(red, [new vscode.Range(0, 1, 0, 100)]);
  window.activeTextEditor.setDecorations(green, [new vscode.Range(1, 1, 1, 100)]);

  context.subscriptions.push({dispose: () => {
    window.activeTextEditor.setDecorations(red, []);
    window.activeTextEditor.setDecorations(green, []);
    red.dispose();
    green.dispose();
  }});
};
  1. Open a folder, then add another folder to the workspace. Then remove the first (original) folder from the workspace. Decoration types will be broken. See the GIF below:

vb

The issue is only reproduced when removing the first folder in the workspace (in this case the extension is deactivated/activated back).

@vscodebot vscodebot bot added the insiders label Sep 8, 2017
@roblourens roblourens added the workbench-multiroot Multi-root (multiple folders) issues label Sep 8, 2017
@bpasero
Copy link
Member

bpasero commented Sep 8, 2017

This seems to be a consequence of the extension host restart. Moving to @alexandrudima

@bpasero bpasero assigned alexdima and unassigned bpasero Sep 8, 2017
@bpasero bpasero added the extension-host Extension host issues label Sep 8, 2017
@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label Sep 12, 2017
@alexdima alexdima added this to the September 2017 milestone Sep 12, 2017
@alexdima
Copy link
Member

Indeed, it appears the decorations are not correctly removed when the extension host is restarted.

@bpasero bpasero added the verified Verification succeeded label Sep 29, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug extension-host Extension host issues verified Verification succeeded workbench-multiroot Multi-root (multiple folders) issues
Projects
None yet
Development

No branches or pull requests

4 participants