Comments
-
Greg Hurrell
This is now mostly fixed as I am saving the window heights before showing the match window and restoring them afterwards.
There is still an edge case or two, like the following, for example:
---------------------------- | 1 | | ---------------| 3 | 2 | | ---------------------------- 4 ----------------------------
When the match window is shown everything gets pushed up:
---------------------------- ---------------| 3 ---------------------------- ---------------------------- matches ----------------------------
Afterwards, however, the reset sizes aren't quite right:
---------------------------- 1 | ---------------| | | 3 | 2 | | ---------------------------- 4 ----------------------------
In particular, note how window 1 is still scrunched up.
What I think is happening is the following:
- We ask VIM to restore window 1 to its original height but VIM refuses because window 3 (still collapsed) serves as a constraint
- We ask VIM to restore window 2 and VIM again refuses
- We ask VIM to restore window 3 and VIM agrees; it then needs to decide what to do with windows 1 and 2, so it decides to grow window 2 downwards, leaving window 1 squashed up
Not entirely sure what the best way to handle this is.
First idea that occurred to me is to do 1 pass through, then perform a second pass and re-request size changes for any windows that haven't acquired the desired size.
The next idea that occurred to me is to sort the requests in order from tallest window through to shortest, so in the example above window 3 would get resized before 2 and 1.
Will experiment.
-
Greg Hurrell
Looks like the second idea (tallest-to-shortest ordering) works.
Marking as closed.
-
Greg Hurrell
Status changed:
- From: new
- To: closed
Add a comment
Comments are now closed for this issue.