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

reset_size() not working after a vertical split #16

Open
dhrunia opened this issue Feb 23, 2019 · 2 comments
Open

reset_size() not working after a vertical split #16

dhrunia opened this issue Feb 23, 2019 · 2 comments

Comments

@dhrunia
Copy link

dhrunia commented Feb 23, 2019

Reset_size() has not no effect after performing a vertical split. After closing the vertical split window it works fine.
Steps to reproduce:

  1. Open two windows
  2. Change split mode to vertical
  3. Open a third window
  4. grow/shrink the window
  5. Call reset_size()

5th step should reset/normalize the size of all windows but it has no effect

@numirias
Copy link
Owner

numirias commented Feb 23, 2019

  1. grow/shrink the window

You're probably growing/shrinking the window on the horizontal axis, not on the vertical one. reset size() only resets on the orientation of the current window with respect to its parent. If you're growing said window vertically instead, reset_size() should work as expected.

The point here is that we need to guess whether resetting the size is meant to be applied vertically or horizontally.

I think I'll solve this by assuming that if reset_size() is called on a window which is already relatively sized, it'll try to call reset_size() on its parent instead.

(In other words: Right now we have grow_height and grow_width, so we'd also need reset_width and reset_height. To avoid adding more commands I'm just gonna make reset_size to the closest parent that is absolutely sized.)

@dhrunia
Copy link
Author

dhrunia commented Feb 23, 2019

yes you are right I was growing on the horizontal axis

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