diff options
author | John Ankarström <john@ankarstrom.se> | 2022-08-30 11:04:49 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-08-30 11:04:49 +0200 |
commit | 3deeb40e4a3c8cbbc6778749845ee37e608ba3d9 (patch) | |
tree | 2be27f83bf52d7617f3a646f4c3b8856a1efa351 /eb.el | |
parent | 6832f91958e6c2cc44a8c4a4e126ea20b8c8d5a3 (diff) | |
download | EpisodeBrowser-3deeb40e4a3c8cbbc6778749845ee37e608ba3d9.tar.gz |
eb.el: Fix fleeting window size.
Diffstat (limited to 'eb.el')
-rw-r--r-- | eb.el | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -38,13 +38,15 @@ (eb--fleeting-minor-mode -1) (quit-window)) (display-buffer-in-direction buffer '((direction . ,dir))) - (select-window (get-buffer-window buffer)) - (with-current-buffer buffer - (setq default-directory cwd) - ,@body - (eb--fleeting-minor-mode) - (setq eb--fleeting--direction ',dir)) - (get-buffer-window buffer))))) + (let ((window (get-buffer-window buffer))) + (select-window window) + (with-current-buffer buffer + (setq default-directory cwd) + ,@body + (eb--fleeting-minor-mode) + (setq eb--fleeting--direction ',dir)) + (run-with-idle-timer 0 nil (lambda (window) (fit-window-to-buffer window)) window) + window))))) (defvar eb--fleeting--buffer nil) (defvar eb--fleeting--window nil) |