imenu-list
imenu-list copied to clipboard
balance-windows makes ilist window take half of screen
Calling balance-windows
(C-x +
) causes imenu-list to take 50% of window instead of staying fixed size (or even being balanced). Problem is probably only obvious if you have 2+ side-by-side non-ilist windows.
I've found this as a workaround, but it causes other problems:
(defun my-balance-windows ()
(interactive)
(imenu-list)
(window-preserve-size (get-buffer-window imenu-list-buffer-name) t t)
(balance-windows))
And this maybe is a more proper workaround:
(add-hook 'imenu-list-minor-mode-hook #'(lambda () (message "in minor hook") (window-preserve-size (get-buffer-window imenu-list-buffer-name) t t)))