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

Options not restored across tabs #7

Closed
mehalter opened this issue Apr 18, 2023 · 4 comments
Closed

Options not restored across tabs #7

mehalter opened this issue Apr 18, 2023 · 4 comments

Comments

@mehalter
Copy link
Contributor

I have noticed that when I restore a multi-tab session the options are not restored to every tab that is created. Things like cmdheight are only fully restored in the tab that ends up getting focused and not the other tabs. I think this is because things like vim.opt.cmdheight are tab scoped and need to be restored each time.

@stevearc
Copy link
Owner

stevearc commented Apr 21, 2023

Wow I missed that! From the docs:

Currently there is only one option local to a tab page: 'cmdheight'.

I'll fix that. Have you noticed this happening with anything else, or just cmdheight?

@mehalter
Copy link
Contributor Author

Thanks so much! Also, I have only noticed it for cmdheght.

stevearc pushed a commit that referenced this issue Apr 22, 2023
@stevearc
Copy link
Owner

I believe I've fixed the issue, but please confirm. This was a bit hacky because there's not good support for tab-local options in the lua API.

Also, I just put in a performance optimization of disabling most autocmds during save & load. LMK if that causes any odd behavior for you.

@mehalter
Copy link
Contributor Author

Just tested this @stevearc and it seems to be working as intended with the tab restore stuff. I will keep an eye out for weird behavior moving forward, but I will go ahead and close this issue since the topic of this one seems to be resolved. That way I can re-open if something weird comes up or if I find new weird behavior I can open a new issue.

Thanks again for the quick response, investigation, and fix!

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

2 participants