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

Setting to prevent panel activation on startup #660

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

GyozaGuy
Copy link

This simply adds another setting called Create Panel On Start that, if checked, prevents the linter UI panel from being created automatically when Atom starts up or is refreshed.

The motivation behind this setting is to help keep the Atom panel clean when it is being used by other extensions. In my particular case, I use X Terminal quite a bit, and when I have multiple terminals open and restart Atom, I don't want the linter UI adding its own tab among my X Terminal tabs.

This setting determines whether or not a new panel is automatically 
created when the editor starts
package.json Outdated Show resolved Hide resolved
await this.activate()
}

this.initialized = true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that the linter is initialized anyway.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, but not until after this.activate() has run. I found that the panel is activated twice really close together on startup because this.activate() calls this.refresh(), which then also calls this.activate(). The code added in lib/panel/index.ts on line 131 prevents this.refresh() from doing anything until this.initialized has been set, so the duplicate activation doesn't happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants