Fix neotree window shrinking when closing splits

Caused when rebalancing windows with sub-character-width fringes. Fixed
by forcibly resizing the neotree window to the correct width each time
it is restored by doom*popup-save.
This commit is contained in:
Henrik Lissner 2017-09-24 15:26:04 +02:00
parent 68aeaebff4
commit 9b0aaee631
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -515,7 +515,10 @@ the command buffer."
"Repair neotree state whenever its popup state is restored. This ensures
that `doom*popup-save' won't break it."
(when (equal (buffer-name) neo-buffer-name)
(setq neo-global--window (selected-window))))
(setq neo-global--window (selected-window))
;; Fix neotree shrinking when closing nearby vertical splits
(when neo-window-fixed-size
(doom-resize-window neo-global--window neo-window-width t t))))
(add-hook 'doom-popup-mode-hook #'+evil|neotree-fix-popup))