Issue #358 resolved

Windows are not adjusted/balanced when others are closed/opened

Anonymous created an issue

In vim, when you close or open a window, even if you've resized other windows, they're all resized to be equal (the equivalent of C-w = in vim/evil or balance-windows in emacs). This could probably be done with advice, but it would probably be better to add it to the end of commands like evil-quit and split-window-right; or maybe there's a way to detect windows closing and opening? rather than changing or adding advice to all the functions that open/close windows?

Comments (3)

  1. Frank Fischer repo owner

    Window handling is one of those things that evil delegates responsibility for to Emacs. There are several packages out there to work with windows in Emacs, maybe one of those does what you want. Or you could register a window-configuration-change-hook or so.

    Anyhow, if we modify Evil's functions so that windows are balanced automatically, then for sure we will get another bug report ...

  2. Frank Fischer repo owner

    optionally rebalance windows after creation/deletion (fix #358)

    If the user option evil-auto-balance-windows is non-nil then Evil's functions that create new windows or delete existing windows automatically rebalance the children of the new/deleted window's parent window. The default value is t to resemble Vim's default behaviour. Note that Emacs' built in functions do not cause rebalancing of the windows.

    → <<cset c93140d737f4>>

  3. Frank Fischer repo owner

    optionally rebalance windows after creation/deletion (fix #358)

    If the user option evil-auto-balance-windows is non-nil then Evil's functions that create new windows or delete existing windows automatically rebalance the children of the new/deleted window's parent window. The default value is t to resemble Vim's default behaviour. Note that Emacs' built in functions do not cause rebalancing of the windows.

    → <<cset c93140d737f4>>

  4. Log in to comment