vim-session
vim-session copied to clipboard
Strange behaviour on :OpenSession [Ubuntu 12.10, Vim 7.3, session with tabs]
The :SaveSession
feature it's OK, but when I use :OpenSession
, the tabs are restored with a blank window each and I have to close them one by one to truly see my original session restored.
:+1:
I have this similar issue. Are you using NERDTree? This is mine.
I think this issue only shows when saving sessions while the NERDTree split is open. After executing :OpenSession
an extra vsplit
is being opened on unfocused tabs. But when I close NERDTree before saving the extra vsplits are not showing.
Yes, I'm using NERDTree! Thanx for the advice, I'll test with NERDTree split closed.
Regards!
I've had this exact problem for ages.
Only when using NERDTree, things get wonky on session restore (I am also using vim-nerdtree-tabs, but that causes a different issue with trees not being resized etc).
An interesting thing I noticed today is that this only happens on the right side of your active tab! For example, in the screenshot below my active tab was index.coffee, anything to the right of it is messed up... If I restart my session with the first tab active, all the other ones are messed up; if I do it with the last tab active, everything is restored nicely. Hopefully that's a clue of some sort.
My Vim setup is on github if needed, but you can probably reproduce this easily.
Edit: It looks like this may be somehow related to #28 ?
I figured out it happens because the winrestcmd()
command generates resize {lines}
command automatically when vim has separated windows. But I don't come up with a good work around.
https://github.com/xolox/vim-session/blob/9e9a6088f0554f6940c19889d0b2a8f39d13f2bb/autoload/xolox/session.vim#L296
Edit
Temporarily using this fix.
https://github.com/fx-kirin/vim-session/blob/d72e947d2c66084339b967008c05f7c576144774/autoload/xolox/session.vim#L296