Why does obsession add tabpages to sessionoptions?
blankname opened this issue · 5 comments
I guess the best way to put it is that if obsession didn't do that, it would behave very weirdly, capturing only the most recently focused tab. It would certainly be possible to make a smarter plugin that acts on a per tab basis, but I have no idea how feasible it would be to retrofit it onto obsession.
Shouldn't the saving of tabs be up to the user's sessionoptions? Or could there be a setting to opt out of this behavior?
Saving tabs seems to interact poorly with 'powerman/vim-plugin-viewdoc', it ends up restoring empty tabs in place of help pages that were open.
So if I took away tabpages
, you'd have to be careful to make sure the correct tab was focused before exiting, otherwise all you would get on restore would be a single blank 'powerman/vim-plugin-viewdoc' tab. I think that's worse then having to close the occasional blank tab.
I won't completely rule out adding an option, but I would highly recommend investigating making 'powerman/vim-plugin-viewdoc' a bit smarter about sessions first.
Also, you could certainly rig up a SessionLoadPost
autocommand to close all blank tabs, if you are ok with a hack solution. I think that's better than adding an option.
I'm okay with the hacky solution after neovim/neovim#6308.
Thanks.