Skip to content

Comments

prevent deadlock when closing the last tab#96

Open
gigamaax wants to merge 2 commits intorockorager:mainfrom
gigamaax:push-lsqwwmzrprpw
Open

prevent deadlock when closing the last tab#96
gigamaax wants to merge 2 commits intorockorager:mainfrom
gigamaax:push-lsqwwmzrprpw

Conversation

@gigamaax
Copy link
Contributor

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_tab and remove_pane_by_id that 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 to remove_pane_by_id instead.

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.
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.

1 participant