persistent-breakpoints.nvim icon indicating copy to clipboard operation
persistent-breakpoints.nvim copied to clipboard

Doesn't work well with sessions

Open foxt451 opened this issue 5 months ago • 1 comments

The problem I have is when I have buffers in sessionoptions and save/restore a session with some buffers having breakpoints. Apparently, upon restoring session neovim adds buffers to your buffer list, but doesn't load their contents. And so when breakpoints.set is called with a line number, the breakpoint ends up at the beginning of the file. I've tried various Buf* events in the config.

Could we somehow add code that loads the related buffers before setting the breakpoints in them?

I replicated this by adding a breakpoint to a file, navigating to another file, then :mksession!, close neovim, open neovim, :source Session.vim and navigating back to the file with a breakpoint

foxt451 avatar Sep 12 '24 23:09 foxt451