Closed zane closed 10 years ago
@zane, Uhmm annoying... In my current version of emacs (24.1.1) this doesn't happen, I tested on a different box with emacs (23.3.1) and the issue is there, which version of emacs are you using? Your solution works really well for simple setups (3 windows or so), have you tried with more complex ones.
@roman I'm running 24.2.1. The hack above only really works for fairly trivial window arrangements, sadly. I think the issue has something to do with the order in which the windows are resized, but I haven't figured out the details yet.
@roman I don't think I communicated this well, but it's very much dependent on the width of the frame. Works fine for me even on 24.2.1 for most widths.
@zane I'm not sure if this can fix your issue (screenshots of OP are not available anymore) but you can take a look at #25.
@syl20bnr Seems to! Let's close this.
@zane see #25 updates. There is a limitation with restored sessions...
If the intention is for horizontal siblings of the focused window to all have the same width that behavior appears to be broken for certain frame width / window combinations. Here we have three windows in a frame with a width of 239 (focused window on the right):
Note that the focused window is the right size, but the middle window is abnormally small.
This function and advice appears to fix the behavior by balancing the widths of all the focused window's siblings from the outside in (order matters, otherwise you wind up resizing the focused window as well). I imagine there's a more elegant solution, but this is what worked for me:
Here is the desired effect of the above advice on a frame with the same width/number of windows: