This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Description
Might be useful as a reference: ::onWillDestroyPaneItem() documentation
Steps which explain the enhancement
atom.workspace.onWillDestroyPaneItem (event) =>
event.prevent()
- 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.
Atom Version: 1.9.7
OS and Version: Windows 10