Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: opening a LazyVim session with folke/persistence.nvim starting y…
…azi (#442) 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
- Loading branch information