branch: externals/ebdb
commit 48a311a4255a78f197264ef763597d8e257d6aaf
Author: Eric Abrahamsen <[email protected]>
Commit: Eric Abrahamsen <[email protected]>
Fix bug in popup buffer window splitting
Fixes #77
Thanks to Alan Schmitt for reporting.
* ebdb-com.el (ebdb-pop-up-window): Size of popup window should be a
function of whether we're splitting horizontally or vertically, not
whether the original window is wider than it is tall.
---
ebdb-com.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ebdb-com.el b/ebdb-com.el
index 0565f89..d615dd6 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -1178,8 +1178,9 @@ popped up from."
(cadr pop))
((or (floatp (cadr pop)) (floatp ebdb-default-window-size))
(let ((flt (or (cadr pop) ebdb-default-window-size)))
- (round (* (max (window-total-width split-window)
- (window-total-height split-window))
+ (round (* (if (memq direction '(left right))
+ (window-total-width split-window)
+ (window-total-height split-window))
(- 1 flt)))))
((integerp ebdb-default-window-size)
ebdb-default-window-size))))