-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
[bug]: only considering 1 other window on width set, plus double enlargement with width unset and ':TroubleToggle' #72
Comments
one possibly important comment: I'm mostly switching windows using the mouse, not using :Focus* cmds |
so I just found I might just wrap my Clicking twice into the wrongly sized window doesn't help either ... So, logical GIST:When focussing windows with the mouse and on VimEnter the sizing is correct. When |
I actually just found the reason for the odd behavior if the width option is set: |
OK, I just created a PR that fixes the problem with the width opt set, that actually was that it wouldn't set winminwidth at all ... if width is set. |
Okay great so we've got the first issue fixed now. Could you try running |
@beauwilliams just tried now in various combinations to run
At this very state:
=> The bug root actually is - or so it appears to me -, that the focus plugin doesn't remember the active window when focus is passed to the Trouble window when opening Trouble ... when then switching back to the still pronounced previously active editor window instead of keeping it's dimensions (because it already was perfectly pronounced via the focus plugin before calling Trouble), it gets pronounce once again, thus becoming ultrawide ... So to fix this you could:
|
hey, just to report additionally what actually seems logic anyway: |
I will have to see the logic for how the screen dimension is set. As far as I am aware it should set it to a fixed size, but perhaps as you said there is something else happening. We can force wincmd that would be quite easy for now at least. I was working on a new API to set the sizes of the windows and the last part of it is tracking the state of all of the windows, quite a task and there were still some limitations that made implementing it hard. So I had to revert back. But the goal was to be able to track and set particular windows as focussed. I will see if I can find the time to work on it again |
Problem description
If I got (wide monitor) 3 split windows horizontally next to each other I expect the other 2 unfocussed windows to relatively get smaller both, but only 1 gets resized, the other one stays as big as was and the 1 that gets resized gets really small ...
This happens if I set the
width
option alongside theminwidth
option like so:This kinda makes the plugin useless for me since there is another bug regarding bottom windows like
trouble
:when I leave the width option unset and leave it to the golden ratio calculation, if I then open and later close the
Trouble
window at the bottom ... the resize/focus-algorithm kicks in in a buggy way - it forgets the window has already been resized and resizes/enlarges the window a second time, making the focussed window huge and the others small, however in this golden-ratio mode, the other windows are both taken into account in my 3-split window setupThis way, wether I set the width or don't, I always run into strange sizing issues that I simply can't circumvent ... Please fix!!! Would love to use this :-) <3
The text was updated successfully, but these errors were encountered: