-
Notifications
You must be signed in to change notification settings - Fork 255
Restoring a session containing a neo-tree sidebar breaks neo-tree #740
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
Comments
Hi! Indeed, this looks like a bug. The neo-tree buffer was saved along with the session, and neo-tree is unable to overwrite that buffer when it is created again. A workaround would be to close the tree before creating the session. I will have a look to see if there is any way to do this automatically. |
Yes, thanks for reminding me. I thought the issue will automatically be closed on PR merge. |
The issue will get automatically closed on release in this repo. It's not a big deal either way if you want to close it on merge to |
I don't think this actually works. The function executes, but restoring a session like
the Also, plugins like
In this case, the |
Good point! I actually thought of adding the cleanup step right after a session was load, but somehow forgot about it. |
@nhat-vo Can confirm that your fix does work, and thank you! A minor issue is that there is a blink after restoring the session (so I did see the empty split was there and got closed during restoring) |
@nyngwang thanks for helping me test! Unfortunately, the |
Unfortunately, at least for me, this fix causes the file tree to randomly close on opening some files in git projects. It's related to |
@treatybreaker thanks for letting me know. Could you tell me how to reproduce it? I tried to open files from the git source, but it was running fine. |
Apologies for not responding until now. I'm going to dig into it tonight and see if I can't get a reproducible error action. Lets close this issue out and if I'm still seeing the issue with a bare bones nvim install, I'll open an issue reporting it. Could just be something funky with my config. |
#771 resolves the issues I had above. I no longer have the issue when pointing lazy to your ref in #771. Also, here's my neo-tree configuration, rather minimal. |
Hi everyone, I just pushed a bit of a breaking change to the new session cleanup functionality. The feature which automatically cleans broken neo-tree buffers restored from a session is now opt-in. If you want to keep it, you need to add this option to your config: auto_clean_after_session_restore = false, -- Automatically clean up broken neo-tree buffers saved in sessions |
Thanks for the great plugin!
Neovim version: 0.8.2
OS: Windows 10
Steps to reproduce:
:Neotree
:mksession mysession.vim
:source mysession.vim
:Neotree
The text was updated successfully, but these errors were encountered: