prevent deadlock when closing the last tab#96
Open
gigamaax wants to merge 2 commits intorockorager:mainfrom
Open
prevent deadlock when closing the last tab#96gigamaax wants to merge 2 commits intorockorager:mainfrom
gigamaax wants to merge 2 commits intorockorager:mainfrom
Conversation
When closing the last tab, with <leader>c for example, both `close_tab` and `remove_pane_by_id` would call prise.exit, resulting in a deadlock. This change removes the cleanup and exit logic from the `close_tab` call and let's `remove_pane_by_id` handle it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces two fixes..
The first is the git branch not showing on initial startup. Prior to this change, the git branch would only display when the directory changed or when you opened a new tab.
The second is a deadlock when the user would press c to close the last (and only) tab. The issue, I think, boiled down to special logic in both
close_tabandremove_pane_by_idthat both attempted to exit prise when they're the last tab. This change removes the special logic to close prise from close_tab, and delegates toremove_pane_by_idinstead.