aboutsummaryrefslogtreecommitdiff
path: root/eb.el
diff options
context:
space:
mode:
Diffstat (limited to 'eb.el')
-rw-r--r--eb.el16
1 files changed, 9 insertions, 7 deletions
diff --git a/eb.el b/eb.el
index 7ca810a..c79c369 100644
--- a/eb.el
+++ b/eb.el
@@ -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)