Fix popup :slot property
It was broken by the new split-window parameter set on popup windows.
This commit is contained in:
parent
069c196330
commit
4b2dbe42a5
1 changed files with 10 additions and 4 deletions
|
@ -1,5 +1,7 @@
|
||||||
;;; ui/popup/autoload/popup.el -*- lexical-binding: t; -*-
|
;;; ui/popup/autoload/popup.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
(defvar +popup--internal nil)
|
||||||
|
|
||||||
(defun +popup--remember (windows)
|
(defun +popup--remember (windows)
|
||||||
"Remember WINDOWS (a list of windows) for later restoration."
|
"Remember WINDOWS (a list of windows) for later restoration."
|
||||||
(cl-assert (cl-every #'windowp windows) t)
|
(cl-assert (cl-every #'windowp windows) t)
|
||||||
|
@ -104,10 +106,12 @@ the buffer is visible, then set another timer and try again later."
|
||||||
|
|
||||||
(defun +popup--split-window (window size side)
|
(defun +popup--split-window (window size side)
|
||||||
"Ensure a non-dedicated/popup window is selected when splitting a window."
|
"Ensure a non-dedicated/popup window is selected when splitting a window."
|
||||||
(cl-loop for win in (delq nil (cons window (window-list)))
|
(unless +popup--internal
|
||||||
unless (or (+popup-window-p win)
|
(cl-loop for win
|
||||||
(window-minibuffer-p win))
|
in (cons (or window (selected-window))
|
||||||
return (setq window win))
|
(window-list nil 0 window))
|
||||||
|
unless (+popup-window-p win)
|
||||||
|
return (setq window win)))
|
||||||
(let ((ignore-window-parameters t))
|
(let ((ignore-window-parameters t))
|
||||||
(split-window window size side)))
|
(split-window window size side)))
|
||||||
|
|
||||||
|
@ -545,12 +549,14 @@ Accepts the same arguments as `display-buffer-in-side-window'. You must set
|
||||||
(or (and next-window
|
(or (and next-window
|
||||||
;; Make new window before `next-window'.
|
;; Make new window before `next-window'.
|
||||||
(let ((next-side (if left-or-right 'above 'left))
|
(let ((next-side (if left-or-right 'above 'left))
|
||||||
|
(+popup--internal t)
|
||||||
(window-combination-resize 'side))
|
(window-combination-resize 'side))
|
||||||
(setq window
|
(setq window
|
||||||
(ignore-errors (split-window next-window nil next-side)))))
|
(ignore-errors (split-window next-window nil next-side)))))
|
||||||
(and prev-window
|
(and prev-window
|
||||||
;; Make new window after `prev-window'.
|
;; Make new window after `prev-window'.
|
||||||
(let ((prev-side (if left-or-right 'below 'right))
|
(let ((prev-side (if left-or-right 'below 'right))
|
||||||
|
(+popup--internal t)
|
||||||
(window-combination-resize 'side))
|
(window-combination-resize 'side))
|
||||||
(setq window
|
(setq window
|
||||||
(ignore-errors (split-window prev-window nil prev-side))))))
|
(ignore-errors (split-window prev-window nil prev-side))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue