Skip to content
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

Error and session load aborts when session loads files with swap files #8

Closed
rish987 opened this issue Apr 26, 2023 · 1 comment
Closed

Comments

@rish987
Copy link

rish987 commented Apr 26, 2023

This plugin (esp. the custom filter and auto-save functionality) has been a lifesaver w.r.t. an issue I've been seeing in another plugin (see Julian/lean.nvim#289) where nvim freezes and has to be killed. In this situation, however, you're often left with swap files that you would like to restore. Currently, trying to load a session where some buffers have swap files results in a lua error and the session load is aborted. See the test at rish987/resession.nvim@e80b556.

This is because currently, the unprotected call to vim.fn.bufload in resession.load means that any error there will make function exit. This should be fixable by guarding it with a pcall.

@rish987
Copy link
Author

rish987 commented May 3, 2023

Closed by #10.

@rish987 rish987 closed this as completed May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant