You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Call .prevent() on the event given as argument to the callback function in ::onWillDestroyPaneItem.
.prevent() can toggle a boolean variable on the .item, letting the system know it should not be closed.
Instead of closing the pane item, the boolean variable will be toggled back.
Current and suggested behavior
Currently there is no way to prevent closing a tab via the JavaScript of a package. But a user of my package pinned-tabs suggested a feature that requires this functionality. All this suggestion should really add is a way to prevent closing a tab when Atom reached the 'WillDestroy' state.
Why would the enhancement be useful to most users
It will mostly be useful for people that want to create a package that in one way or another have 'priority' tabs that they don't want to be closed when for example the close-all-tabs command is fired.