[Top][All Lists]

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

bug#36894: Stability issues in frameset sorting

From: Juri Linkov
Subject: bug#36894: Stability issues in frameset sorting
Date: Fri, 02 Aug 2019 00:34:57 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

Tags: patch

Currently frameset sorting is not stable.  It changes the sorting order of equal
minibuffer-owning frames.  On closer inspection it becomes clear that
frameset--mini parameters are messed up in 'frameset--minibufferless-last-p'.
This patch should fix it:

diff --git a/lisp/frameset.el b/lisp/frameset.el
index 73b2071a5a..0d921421ad 100644
--- a/lisp/frameset.el
+++ b/lisp/frameset.el
@@ -1102,8 +1104,8 @@ frameset--minibufferless-last-p
   "Predicate to sort frame states in an order suitable for creating frames.
 It sorts minibuffer-owning frames before minibufferless ones.
 Internal use only."
-  (pcase-let ((`(,hasmini1 ,id-def1) (assq 'frameset--mini (car state1)))
-             (`(,hasmini2 ,id-def2) (assq 'frameset--mini (car state2))))
+  (pcase-let ((`(,hasmini1 . ,id-def1) (cdr (assq 'frameset--mini (car 
+             (`(,hasmini2 . ,id-def2) (cdr (assq 'frameset--mini (car 
     (cond ((eq id-def1 t) t)
          ((eq id-def2 t) nil)
          ((not (eq hasmini1 hasmini2)) (eq hasmini1 t))

reply via email to

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