tpope / vim-obsession

obsession.vim: continuously updated session files
http://www.vim.org/scripts/script.php?script_id=4472
1.74k stars 68 forks source link

Obsession not work automatically when attached to a existing session. #56

Open thepenguinthatwants opened 5 years ago

thepenguinthatwants commented 5 years ago

Hi Tim!

When I open a session and do changes and then pause Obsession it doesnt seem to save anything. This can be tested by opening the session after layout changes.

But when I use :Obsession command twice so it says that it stops and track again.. and do some changes and then :Obsession to pause.. it actually saves the changes such as layout etc.

I use

:source ~/.config/nvim/sessions/test

to open the session up.

Not sure how to get logs for this behaviour.

tpope commented 5 years ago

Was ~/.config/nvim/sessions/test originally created by Obsession?

thepenguinthatwants commented 5 years ago

Yeah I used the command like this.

:Obsession ~/.config/nvim/sessions/test

My NVIM version is 0.3.8

tpope commented 5 years ago

If you call :Obsession to pause, it stops saving future changes, but the current state is still saved. Does that explain things?

thepenguinthatwants commented 5 years ago

So when I load a session which was started with obsession and then run :Obsession to pause it doesnt save the current state.

But when I run :Obsession again and then :Obsession to pause then it saved the changes that were make after the first stop and start. So I mean even thought it is "running" from starting session it still doesnt save it before stopping obsession and starting again and then stop.