aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-30 11:04:49 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-30 11:04:49 +0200
commit3deeb40e4a3c8cbbc6778749845ee37e608ba3d9 (patch)
tree2be27f83bf52d7617f3a646f4c3b8856a1efa351
parent6832f91958e6c2cc44a8c4a4e126ea20b8c8d5a3 (diff)
downloadEpisodeBrowser-3deeb40e4a3c8cbbc6778749845ee37e608ba3d9.tar.gz
eb.el: Fix fleeting window size.
-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)