natecraddock / sessions.nvim

a simple session manager plugin
MIT License
133 stars 8 forks source link

Deleted buffer is loaded when `require('sessions').load` #12

Open Jaehaks opened 1 month ago

Jaehaks commented 1 month ago

Thank you for your efforts.

I loaded 4 buffers and removed 1 buffers from list. The removed 1 buffer is listed also as $argadd in session_filepath file. image I guess it is related with why the removed 1 buffer is loaded when I call load() function.

I called sessions.save when Vim Leaves like this

vim.api.nvim_create_autocmd('VimLeavePre', {
    group = User_augroup,
    pattern = '*',
    callback = function ()
        sessions.save(saved_path, {autosave = false})
    end
})

Is this working normally?