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

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

[elpa] externals/ace-window 95a75e6 50/92: ace-window.el: Fix frame-para


From: Stefan Monnier
Subject: [elpa] externals/ace-window 95a75e6 50/92: ace-window.el: Fix frame-parameter being nil sometimes
Date: Wed, 17 Mar 2021 18:39:20 -0400 (EDT)

branch: externals/ace-window
commit 95a75e63d826f27aa6b746d0f458bd1dda7055db
Author: Ca Xiansheng <caxiansheng@gmail.com>
Commit: Ca Xiansheng <caxiansheng@gmail.com>

    ace-window.el: Fix frame-parameter being nil sometimes
    
        Happens on Emacs-24.5.1.
---
 ace-window.el | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/ace-window.el b/ace-window.el
index 1382fdd..7535f67 100644
--- a/ace-window.el
+++ b/ace-window.el
@@ -580,13 +580,16 @@ window."
   "Return true if WND1 is less than WND2.
 This is determined by their respective window coordinates.
 Windows are numbered top down, left to right."
-  (let ((f1 (window-frame wnd1))
-        (f2 (window-frame wnd2))
-        (e1 (window-edges wnd1))
-        (e2 (window-edges wnd2)))
-    (cond ((< (car (frame-position f1)) (car (frame-position f2)))
+  (let* ((f1 (window-frame wnd1))
+        (f2 (window-frame wnd2))
+        (e1 (window-edges wnd1))
+        (e2 (window-edges wnd2))
+        (p1 (frame-position f1))
+        (p2 (frame-position f2))
+        (nl (or (null (car p1)) (null (car p2)))))
+    (cond ((and (not nl) (< (car p1) (car p2)))
            (not aw-reverse-frame-list))
-          ((> (car (frame-position f1)) (car (frame-position f2)))
+          ((and (not nl) (> (car p1) (car p2)))
            aw-reverse-frame-list)
           ((< (car e1) (car e2))
            t)



reply via email to

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