[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/popper 50568b8af2 090/102: popper.el: Fix child-frame r
From: |
ELPA Syncer |
Subject: |
[elpa] externals/popper 50568b8af2 090/102: popper.el: Fix child-frame resetting popups |
Date: |
Fri, 8 Sep 2023 15:58:56 -0400 (EDT) |
branch: externals/popper
commit 50568b8af2ee4c43d4a5b55241fac7ef11e2f9db
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
popper.el: Fix child-frame resetting popups
* popper.el (popper--update-popups): Because
`window-configuration-change-hook'
runs when a child-frame (such as corfu) is spawned, it resets the list of
open
popups to nil each time. `popper--update-popups' now checks if it's called
on a
child frame.
---
popper.el | 59 ++++++++++++++++++++++++++++++-----------------------------
1 file changed, 30 insertions(+), 29 deletions(-)
diff --git a/popper.el b/popper.el
index 5cb639d10f..2c97068b9d 100644
--- a/popper.el
+++ b/popper.el
@@ -354,36 +354,37 @@ Each element of the alist is a cons cell of the form
(window . buffer)."
"Update the list of currently open popups.
Intended to be added to `window-configuration-change-hook'."
- (let* ((open-buffers (mapcar #'window-buffer (window-list)))
- (open-popups (popper--find-popups open-buffers))
- (closed-popups (cl-remove-if-not
- (lambda (win-buf)
- (memq (buffer-local-value 'popper-popup-status (cdr
win-buf))
- '(popup user-popup)))
- (cl-set-difference popper-open-popup-alist
open-popups :key #'cdr))))
- (setq popper-open-popup-alist (nreverse open-popups))
- ;; First remove all open popups that have been opened
- (cl-loop for (_ . buf) in open-popups do
- (let* ((group-name (when popper-group-function
- (with-current-buffer buf (funcall
popper-group-function))))
- (group-popups (cdr (assoc group-name
popper-buried-popup-alist 'equal))))
- (setf (alist-get group-name popper-buried-popup-alist
- nil nil 'equal)
- (cl-remove buf group-popups :key #'cdr))))
- ;; Then add all popups that have been closed
- (cl-loop for (win . buf) in closed-popups do
- (let* ((group-name (when popper-group-function
- (with-current-buffer buf (funcall
popper-group-function))))
- (group-popups (cdr (assoc group-name
popper-buried-popup-alist 'equal)))
- (newpop (cons win buf)))
- (setf (alist-get group-name popper-buried-popup-alist
- nil nil 'equal)
- (append (list newpop)
- (cl-remove newpop group-popups :key 'cdr))))))
- ;; Mode line update
- (cl-loop for (_ . buf) in popper-open-popup-alist do
+ (unless (frame-parent)
+ (let* ((open-buffers (mapcar #'window-buffer (window-list nil 'no-mini)))
+ (open-popups (popper--find-popups open-buffers))
+ (closed-popups (cl-remove-if-not
+ (lambda (win-buf)
+ (memq (buffer-local-value 'popper-popup-status
(cdr win-buf))
+ '(popup user-popup)))
+ (cl-set-difference popper-open-popup-alist
open-popups :key #'cdr))))
+ (setq popper-open-popup-alist open-popups)
+ ;; First remove all open popups that have been opened
+ (cl-loop for (_ . buf) in open-popups do
+ (let* ((group-name (when popper-group-function
+ (with-current-buffer buf (funcall
popper-group-function))))
+ (group-popups (cdr (assoc group-name
popper-buried-popup-alist 'equal))))
+ (setf (alist-get group-name popper-buried-popup-alist
+ nil nil 'equal)
+ (cl-remove buf group-popups :key #'cdr))))
+ ;; Then add all popups that have been closed
+ (cl-loop for (win . buf) in closed-popups do
+ (let* ((group-name (when popper-group-function
+ (with-current-buffer buf (funcall
popper-group-function))))
+ (group-popups (cdr (assoc group-name
popper-buried-popup-alist 'equal)))
+ (newpop (cons win buf)))
+ (setf (alist-get group-name popper-buried-popup-alist
+ nil nil 'equal)
+ (append (list newpop)
+ (cl-remove newpop group-popups :key 'cdr))))))
+ ;; Mode line update
+ (cl-loop for (_ . buf) in popper-open-popup-alist do
(with-current-buffer buf
- (setq mode-line-format (popper--modified-mode-line)))))
+ (setq mode-line-format (popper--modified-mode-line))))))
(defun popper--find-buried-popups ()
"Update the list of currently buried popups.
- [elpa] externals/popper a29c603acd 055/102: Merge branch 'feature' of github.com:karthink/popper into feature, (continued)
- [elpa] externals/popper a29c603acd 055/102: Merge branch 'feature' of github.com:karthink/popper into feature, ELPA Syncer, 2023/09/08
- [elpa] externals/popper b9673ae612 059/102: Fix popper-window-height usage, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 9b1cff1b57 061/102: Popups are updated correctly now, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 032e75bf08 063/102: Added feature to show popups in echo area when cycling., ELPA Syncer, 2023/09/08
- [elpa] externals/popper 8d2b664465 067/102: Popper-echo will use up to 2 minibuffer lines by default, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 9e368e1d20 072/102: Clarify: Does not support popups in new frames, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 6a2ddcb354 073/102: Added tip to match shell buffers, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 2650056e0e 075/102: Dispatch action control with popper-echo, ELPA Syncer, 2023/09/08
- [elpa] externals/popper a50edecacf 080/102: Fix popper-mode-line for simple-modeline, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 3212241316 083/102: Fix #29: Error while modifying mode line. (#30), ELPA Syncer, 2023/09/08
- [elpa] externals/popper 50568b8af2 090/102: popper.el: Fix child-frame resetting popups,
ELPA Syncer <=
- [elpa] externals/popper cc48e01219 091/102: Sort open popups by display time., ELPA Syncer, 2023/09/08
- [elpa] externals/popper f0038228eb 093/102: Silence compiler warnings on Emacs 29 (#44), ELPA Syncer, 2023/09/08
- [elpa] externals/popper 44752c5121 020/102: Better test for removing from display-buffer-alist, ELPA Syncer, 2023/09/08
- [elpa] externals/popper a507d3d441 022/102: Minor changes, increase version, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 71d77ae775 029/102: Typos in README, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 6ef0a670e5 032/102: Update README with more info, ELPA Syncer, 2023/09/08
- [elpa] externals/popper a85a343c99 027/102: Merge branch 'popup-groups', ELPA Syncer, 2023/09/08
- [elpa] externals/popper 31dc52c313 036/102: Prettifying README, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 89ed8ab2da 038/102: Documentation update + kill-latest-popup kills frames now, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 268ac30047 046/102: More comprehensive delete-popup function + see, ELPA Syncer, 2023/09/08