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