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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search editor: resolves content even if not the active editor #98639

Closed
bpasero opened this issue May 27, 2020 · 2 comments
Closed

Search editor: resolves content even if not the active editor #98639

bpasero opened this issue May 27, 2020 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues search-editor verified Verification succeeded
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented May 27, 2020

Steps to Reproduce:

  1. open a search editor and save it
  2. make sure it has contents
  3. click on another tab thus making it inactive
  4. add a console.log statement into getModel
  5. reload window

=> 馃悰 the contents are resolved

That is not the idea of editors in VSCode, the model should only get loaded if:

  • the model is dirty (e.g. restored from backup)
  • the editor is active
@bpasero bpasero added freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues search-editor labels May 27, 2020
@JacksonKearl JacksonKearl added bug Issue identified by VS Code Team member as probable bug and removed bug Issue identified by VS Code Team member as probable bug labels May 27, 2020
@JacksonKearl
Copy link
Contributor

Why should the model get loaded immediately if it is dirty? As in is there danger in always waiting until the editor is active to resolve the model?

@bpasero
Copy link
Member Author

bpasero commented May 28, 2020

Why should the model get loaded immediately

We have to, because otherwise language services would not see these changes when they start up. They would load contents of the file on disk and not the model as it is dirty in VSCode, so we need to forcefully load any dirty model on startup.

@JacksonKearl JacksonKearl added this to the May 2020 milestone May 28, 2020
@bpasero bpasero added the verified Verification succeeded label Jun 2, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 12, 2020
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 freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues search-editor verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

2 participants