parent
c6063de439
commit
e27d9b35d3
1 changed files with 13 additions and 5 deletions
|
@ -512,17 +512,24 @@ Accepts the same arguments as `display-buffer-in-side-window'. You must set
|
||||||
(and (eq (window-parameter window 'window-side) side)
|
(and (eq (window-parameter window 'window-side) side)
|
||||||
(eq (window-parameter window 'window-vslot) vslot)))
|
(eq (window-parameter window 'window-vslot) vslot)))
|
||||||
nil))
|
nil))
|
||||||
;; As opposed to the `window-side' property, the `window-vslot'
|
;; As opposed to the `window-side' property, our `window-vslot'
|
||||||
;; property is set only on a single live window and never on internal
|
;; parameter is set only on a single live window and never on internal
|
||||||
;; windows. Moreover, as opposed to `window-with-parameter' (as used
|
;; windows. Moreover, as opposed to `window-with-parameter' (as used
|
||||||
;; by the original `display-buffer-in-side-window'),
|
;; by the original `display-buffer-in-side-window'),
|
||||||
;; `get-window-with-predicate' only returns live windows anyway. In
|
;; `get-window-with-predicate' only returns live windows anyway. In
|
||||||
;; any case, we will have missed the major side window and got a
|
;; any case, we will have missed the major side window and got a
|
||||||
;; child instead if the major side window happens to be an internal
|
;; child instead if the major side window happens to be an internal
|
||||||
;; window. In that case, the major side window is the parent of the
|
;; window with multiple children. In that case, all childen should
|
||||||
;; live window.
|
;; have the same `window-vslot' parameter, and the major side window
|
||||||
|
;; is the parent of the live window.
|
||||||
|
(prev (and live (window-prev-sibling live)))
|
||||||
|
(next (and live (window-next-sibling live)))
|
||||||
|
(prev-vslot (and prev (window-parameter prev 'window-vslot)))
|
||||||
|
(next-vslot (and next (window-parameter next 'window-vslot)))
|
||||||
(major (and live
|
(major (and live
|
||||||
(if (window-next-sibling live) (window-parent live) live)))
|
(if (or (eq prev-vslot vslot) (eq next-vslot vslot))
|
||||||
|
(window-parent live)
|
||||||
|
live)))
|
||||||
(reversed (window--sides-reverse-on-frame-p (selected-frame)))
|
(reversed (window--sides-reverse-on-frame-p (selected-frame)))
|
||||||
(windows
|
(windows
|
||||||
(cond ((window-live-p major)
|
(cond ((window-live-p major)
|
||||||
|
@ -614,6 +621,7 @@ Accepts the same arguments as `display-buffer-in-side-window'. You must set
|
||||||
(setq window
|
(setq window
|
||||||
(ignore-errors (split-window prev-window nil prev-side))))))
|
(ignore-errors (split-window prev-window nil prev-side))))))
|
||||||
(set-window-parameter window 'window-slot slot)
|
(set-window-parameter window 'window-slot slot)
|
||||||
|
(set-window-parameter window 'window-vslot vslot)
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
(setq window--sides-shown t))
|
(setq window--sides-shown t))
|
||||||
(window--display-buffer
|
(window--display-buffer
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue