emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ebdb 722e2c3 211/350: Mild hack to make pop up windows


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb 722e2c3 211/350: Mild hack to make pop up windows work well
Date: Mon, 14 Aug 2017 11:46:38 -0400 (EDT)

branch: externals/ebdb
commit 722e2c38013ddb70dd4496b0512e21a23d713081
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Mild hack to make pop up windows work well
    
    * ebdb-com.el (ebdb-pop-up-window): Make sure window splits.  See code
      comment.
---
 ebdb-com.el | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index a33620c..901797f 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -975,8 +975,19 @@ buffer."
                              (> (window-total-width split-window)
                                 (window-total-height split-window)))
                         'horiz
-                      'vert)))
-
+                      'vert))
+        ;; This is a hack, necessitated by my ignorance about window
+        ;; splitting.  We were originally using `split-window'
+        ;; directly; I changed that because it seemed better to be
+        ;; using a higher-level function, and because
+        ;; `display-buffer-pop-up-window' sets the `quit-restore'
+        ;; window parameter correctly.  But it's also too clever, and
+        ;; won't split windows on small screens, and we essentially
+        ;; don't ever want *EBDB* to reuse an existing window.
+        ;; Probably I should just go back to using `split-window',
+        ;; and figure out how to manually set `quit-restore'.
+        (split-width-threshold (/ split-width-threshold 2))
+        (split-height-threshold (/ split-height-threshold 2)))
     (cond (buffer-window
           ;; It's already visible, re-use it.
           nil)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]