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

equalalways is smarter on splitting than closing #5955

Open
ubitux opened this issue Apr 19, 2020 · 2 comments
Open

equalalways is smarter on splitting than closing #5955

ubitux opened this issue Apr 19, 2020 · 2 comments

Comments

@ubitux
Copy link

ubitux commented Apr 19, 2020

vim --clean -c "vs | vs | sp | res +15 | winc l | winc l | sp | clo"

What I got:       What I expected:

┌───┬───┬───┐     ┌───┬───┬───┐
│   │   │   │     │   │   │   │
├───┤   │   │     │   │   │   │
│   │   │   │     ├───┤   │   │
└───┴───┴───┘     └───┴───┴───┘

equalalways is on by default, and if you don't do the last close (vim --clean -c "vs | vs | sp | res +15 | winc l | winc l | sp") you realize the last split on the right doesn't trigger a global window equalization affecting the left split:

┌───┬───┬───┐
│   │   │   │
│   │   ├───┤
├───┤   │   │
└───┴───┴───┘

This is a good thing: the left side should not be affected by the creation of a split on the opposite side. On the other hand, closing does affect it for some reason.

Reproducible with Vim 8.2.0510

@tyru
Copy link

tyru commented Apr 19, 2020

Maybe vim --clean -c "vs | vs | sp | res +15 | setl winfixheight | winc l | winc l | sp | clo" saves you?

@ubitux
Copy link
Author

ubitux commented Apr 19, 2020

Maybe vim --clean -c "vs | vs | sp | res +15 | setl winfixheight | winc l | winc l | sp | clo" saves you?

Yeah no worry, I have workarounds; I'm reporting because I believe there is an issue. BTW, the problem with the workaround your propose is that it breaks the automatic equalization when it matters in the future (typically if I :sp again on the left side).

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