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

window.visibleEditors & window.onDidChangeVisibleTextEditors return inconsistent results #36579

Closed
eamodio opened this issue Oct 19, 2017 · 9 comments
Assignees
Labels
api bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@eamodio
Copy link
Contributor

eamodio commented Oct 19, 2017

  • VSCode Version: Code - Insiders 1.18.0-insider (4b01451, 2017-10-19T08:29:07.096Z)
  • OS Version: Windows_NT x64 10.0.17017

Steps to Reproduce:

  1. Create (use) a simple extension that subscribes to window.onDidChangeVisibleTextEditors or polls window.visibleTextEditors
  2. Watch/log the editors returned

Normal editors come and go as expected when their visibility changes, but other panels have inconsistent behavior.

  • Problems & Terminal panes never appear in the list regardless of visibility
  • Output & Debug Console panes will appear in the list when they first become visible, but never seem to leave the list regardless of visibility

I'm unsure why the Output & Debug Console panes ever appear in the list -- I would much prefer they didn't as they aren't really editors. Also if they are to stay in that list it feels like there should be some consistency with the Problems & Terminal panes as well, and they should certainly IMO be removed from the list when they aren't visible

I feel like this behavior has changed in 1.17, but I can't be sure.

Reproduces without extensions: No

@vscodebot vscodebot bot added the debug Debug viewlet, configurations, breakpoints, adapter issues label Oct 19, 2017
@eamodio
Copy link
Contributor Author

eamodio commented Oct 19, 2017

FYI, this is not a debug issue (as the "helpful" bot) labeled it

//cc @jrieken

@isidorn isidorn removed the debug Debug viewlet, configurations, breakpoints, adapter issues label Oct 20, 2017
@isidorn isidorn assigned jrieken and unassigned isidorn Oct 20, 2017
@jrieken
Copy link
Member

jrieken commented Oct 23, 2017

I feel like this behavior has changed in 1.17, but I can't be sure.

It has been like that since forever

I'm unsure why the Output & Debug Console panes ever appear in the list -- I would much prefer they didn't as they aren't really editors.

They are implemented as text editor, that's why. I am closing this as question.

@jrieken jrieken added api *question Issue represents a question, should be posted to StackOverflow (VS Code) labels Oct 23, 2017
@jrieken jrieken closed this as completed Oct 23, 2017
@eamodio
Copy link
Contributor Author

eamodio commented Oct 23, 2017

Shouldn't they at a minimum respect visibility? It is called visibleTextEditors

@jrieken
Copy link
Member

jrieken commented Oct 23, 2017

Yeah, that's a bad name choice...

@eamodio
Copy link
Contributor Author

eamodio commented Oct 23, 2017

And all other editors respect visibility to be in that list.

@eamodio
Copy link
Contributor Author

eamodio commented Nov 2, 2017

@jrieken Can this be reopened then? Still seems like an issue to me

@jrieken
Copy link
Member

jrieken commented Nov 2, 2017

Output & Debug Console panes will appear in the list when they first become visible, but never seem to leave the list regardless of visibility

Yeah, they should leave the list eventually...

@jrieken jrieken reopened this Nov 2, 2017
@jrieken jrieken added bug Issue identified by VS Code Team member as probable bug and removed *question Issue represents a question, should be posted to StackOverflow (VS Code) labels Nov 2, 2017
@jrieken
Copy link
Member

jrieken commented Dec 15, 2017

With @sandy081 recent work on output channels this got already a lot better. It's now just the debug console that stays alive forever and @isidorn might know why that is

@isidorn
Copy link
Contributor

isidorn commented Dec 15, 2017

I can look into disposing the debug console input once it is hidden

@isidorn isidorn assigned isidorn and unassigned jrieken Dec 15, 2017
@isidorn isidorn added this to the December 2017/January 2018 milestone Dec 15, 2017
@isidorn isidorn closed this as completed in 85c2a6e Jan 4, 2018
@roblourens roblourens added the verified Verification succeeded label Feb 1, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants