imenu-list icon indicating copy to clipboard operation
imenu-list copied to clipboard

balance-windows makes ilist window take half of screen

Open MicahElliott opened this issue 2 years ago • 0 comments

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)))

MicahElliott avatar May 18 '22 18:05 MicahElliott