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

fix: Respect hidden statusline in window size calculation #110

Merged
merged 1 commit into from
May 8, 2023

Conversation

vimpostor
Copy link
Contributor

Previously the size calculation hardcoded subtracting 1 for the statusline.
But this is not correct, if the user sets laststatus=0 for example.

Fix this by respecting the laststatus setting in the size calculation.

This problem was found in vimpostor/vim-tpipeline#55

The window_height calculation hardcoded subtracting 1 for the height of
the statusline.
But this is not correct, if the statusline is not visible, which is the
case if either the user sets laststatus=0 or sets laststatus=1 and has
more than one window open.

Fix this by respecting the laststatus setting and adapt the calculation
accordingly.
This is pretty much identical to the tabline height calculation code
that already existed below.
@vimpostor vimpostor changed the title Fix window height calculation with hidden statusline fix: Respect hidden statusline in window size calculation May 6, 2023
Copy link
Owner

@mrjones2014 mrjones2014 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mrjones2014 mrjones2014 merged commit b37c717 into mrjones2014:master May 8, 2023
2 of 3 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants