-
Notifications
You must be signed in to change notification settings - Fork 19
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
When the session is restored, yazi will also be opened automatically #440
Comments
I'm not familiar with this feature. I use lazyvim and it saves the session automatically (I think). I can reload the session with How do you reload your session exactly? |
Just like you. |
I am having something that might be similar or related. When I navigate with yazi.nvim then quit with |
Uh, I don't get it. |
This happened to me too, and I opened this issue to investigate it sxyazi/yazi#1610. Right now yazi does not seem to have a way to open and hover a directory. |
Yeah, I understand what you mean, and I tried it. It's the same for me, but I think it's different from my issue. My issue seems more like |
Yeah I think that case is different. Is there some way I can reproduce this? |
Yeah, You can try it this way (with config above). cd ~/.config/yazi # Any dir
nvim .
# Yazi open automatically and select any file to open, then exit neovim (<leader>qq in Lazyvim).
nvim Then you'll see it as shown in the screenshot above. |
When I open nvim the second time, it does not open any files - it shows the lazyvim default startup screen. Do you have some setting or other plugin that might do something here? |
Oh, sorry,I forgot a step,enter the startup and press s to reload session, then it will appear.在 2024年9月8日,14:40,Mika Vilpas ***@***.***> 写道:
When I open nvim the second time, it does not open any files - it shows the lazyvim default startup screen. Do you have some setting or other plugin that might do something here?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Oh now I can reproduce it. Thanks! I'll try to figure out a good way to fix this. |
Thanks,Looking forward to your good news. |
Issue = In the following scenario, when all of these happened, yazi would always open when restoring a session: - When using LazyVim / folke/persistence.nvim - start neovim with `nvim .` - open a file - close neovim - start neovim with `nvim` - restore the last session with persistence.nvim This seemed to happen because the session includes the `.` which was given as an argument to neovim. Restoring the session would open the directory in yazi. Solution = The solution is to check if the `SessionLoad` variable is set to `1` and skip opening yazi if it is. This is because the `SessionLoad` variable is set to `1` when restoring a session. See `:h SessionLoad-variable` for more information. Fixes #440
Should be fixed - let me know if there are any issues that remain. Also, thanks for reporting this bug! |
Thanks,it has been fixed. |
Version
Description
After opening the folder to restore the session(there are already files open), Yazi opens automatically.
Steps To Reproduce
Enter the folder where the session has been saved, enter
nvim
, and then reload the session.Expected Behavior
Like neo-tree, when the session already has files open, don't open yazi.
My config
The text was updated successfully, but these errors were encountered: