Skip to content

Commit

Permalink
Sort open popups by display time.
Browse files Browse the repository at this point in the history
  • Loading branch information
karthink committed Jan 20, 2023
1 parent 50568b8 commit cc48e01
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion popper.el
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,12 @@ Each element of the alist is a cons cell of the form (window . buffer)."
'suppressed
'popup))))
(push (cons (get-buffer-window b) b)
open-popups))))))
open-popups))))
(cl-sort open-popups
(lambda (a b) (time-less-p b a))
:key (lambda (p)
(buffer-local-value 'buffer-display-time
(cdr p))))))

(defun popper--update-popups ()
"Update the list of currently open popups.
Expand Down

0 comments on commit cc48e01

Please sign in to comment.