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

Strange behaviour on :OpenSession [Ubuntu 12.10, Vim 7.3, session with tabs] #72

Open
tarciozemel opened this issue Jul 21, 2013 · 4 comments

Comments

@tarciozemel
Copy link

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.

@jezeniel
Copy link

jezeniel commented Sep 5, 2014

👍

I have this similar issue. Are you using NERDTree? This is mine.

2014-09-05-153449_1600x900_scrot

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.

@tarciozemel
Copy link
Author

Yes, I'm using NERDTree! Thanx for the advice, I'll test with NERDTree split closed.

Regards!

@dsimidzija
Copy link

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.

image

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 ?

@fx-kirin
Copy link

fx-kirin commented Apr 10, 2018

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.

call add(a:session, winrestcmd)

Edit

Temporarily using this fix.

https://github.com/fx-kirin/vim-session/blob/d72e947d2c66084339b967008c05f7c576144774/autoload/xolox/session.vim#L296

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

No branches or pull requests

4 participants