olimorris / persisted.nvim

💾 Simple session management for Neovim with git branching, autoloading and Telescope support
MIT License
418 stars 24 forks source link

`autosave` should not fires when opening single file in any directory #60

Closed latipun7 closed 1 year ago

latipun7 commented 1 year ago

I have session at ~/.local/share/chezmoi, the autosave should trigger in any directory if I run nvim in that directory, and it's true and works. But the previous behavior seems lost. When I open file with nvim $HISTFILE in ~/.local/share/chezmoi, then close it, now the session contain only file $HISTFILE, which is not what I desire and not the previous behaivor. The autosave should automatically not triggered when opening file directly, i.e. nvim /path/to/file, nvim $HISTFILE, etc.

Tool Version
NVIM NVIM v0.9.0-dev-1166+g06aed7c17
Persisted 88f27dc

Originally posted by @latipun7 in https://github.com/olimorris/persisted.nvim/issues/51#issuecomment-1461361010

olimorris commented 1 year ago

Can you share your config too?

olimorris commented 1 year ago

I've been able to recreate this! Will work on a fix.

olimorris commented 1 year ago

@latipun7 this should be fixed. Thanks for pointing this out.