Skip to content

fix(view): Recreate tree buffer if deleted, and handle scenario where buffer already exists. #307

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

Merged
merged 4 commits into from
Apr 16, 2021

Conversation

sindrets
Copy link
Contributor

Fixes #296.

This makes the tree able to recover when the tree buffer gets deleted or wiped. It also tackles scenarios where the NvimTree buffer already exists before initialization, as a result of i.e. a session being loaded. This is what I believe is the root of the problems described in 296.

@sindrets
Copy link
Contributor Author

This seems to fix the problems described in 296, but I need to test this more thoroughly.

@kyazdani42
Copy link
Member

i was going to do it but thanks for doing it first :)

@sindrets sindrets marked this pull request as ready for review April 16, 2021 20:17
@sindrets
Copy link
Contributor Author

This seems to work quite well on my end. So if we can get some of the people over in 296 to test this, I think we're good to go.

Copy link
Member

@kyazdani42 kyazdani42 left a comment

Choose a reason for hiding this comment

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

almost :D

@Shatur
Copy link

Shatur commented Apr 16, 2021

This seems to work quite well on my end. So if we can get some of the people over in 296 to test this, I think we're good to go.

Tested, works as expected!

@kyazdani42 kyazdani42 merged commit 4ee45d9 into nvim-tree:master Apr 16, 2021
@kyazdani42
Copy link
Member

thanks again !

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.

Session Restore Problems
3 participants