stevearc / resession.nvim

A replacement for mksession with a better API
MIT License
221 stars 15 forks source link

fix: fails to continue loading session if any file has a swap file #9

Closed rish987 closed 1 year ago

rish987 commented 1 year ago

Closes #8.

It looks like when you load a file through vim.fn.bufload the swap file warning message is displayed upon loading the session, without the user input prompt, the result being equivalent to the (E)dit anyway option for all of the loaded files. So, it's up to the user to do :e on all the files that they would like to restore the swap files for.

stevearc commented 1 year ago

Thanks for the report and the PR! Swapfile handling is something that I've generally not put much thought into prior to this, and it prompted me to do a lot of research on my own to see how the flow currently works and how it could be improved. I ended up going in a slightly different direction, and I want to get your opinion on this approach: #10

rish987 commented 1 year ago

Awesome, thanks, I much prefer that approach. I'll close this PR in favor of yours.