Cleaner logic on getting frame and window
This commit is contained in:
parent
6ce7402874
commit
d5c52cb7f0
13
eldoc-box.el
13
eldoc-box.el
@ -247,13 +247,16 @@ Checkout `lsp-ui-doc--make-frame', `lsp-ui-doc--move-frame'."
|
|||||||
`((default-minibuffer-frame . ,(selected-frame))
|
`((default-minibuffer-frame . ,(selected-frame))
|
||||||
(minibuffer . ,(minibuffer-window))
|
(minibuffer . ,(minibuffer-window))
|
||||||
(left-fringe . ,(frame-char-width)))))
|
(left-fringe . ,(frame-char-width)))))
|
||||||
(window (or (and eldoc-box--frame (frame-selected-window eldoc-box--frame))
|
window frame
|
||||||
(display-buffer-in-child-frame
|
|
||||||
buffer
|
|
||||||
`((child-frame-parameters . ,parameter)))))
|
|
||||||
(frame (window-frame window))
|
|
||||||
(main-frame (selected-frame)))
|
(main-frame (selected-frame)))
|
||||||
(make-frame-visible frame)
|
(make-frame-visible frame)
|
||||||
|
(if eldoc-box--frame
|
||||||
|
(progn (setq frame eldoc-box--frame)
|
||||||
|
(setq window (frame-selected-window frame)))
|
||||||
|
(setq window (display-buffer-in-child-frame
|
||||||
|
buffer
|
||||||
|
`((child-frame-parameters . ,parameter))))
|
||||||
|
(setq frame (window-frame window)))
|
||||||
(set-window-dedicated-p window t)
|
(set-window-dedicated-p window t)
|
||||||
(redirect-frame-focus frame (frame-parent frame))
|
(redirect-frame-focus frame (frame-parent frame))
|
||||||
(set-face-attribute 'internal-border frame :inherit 'eldoc-box-border)
|
(set-face-attribute 'internal-border frame :inherit 'eldoc-box-border)
|
||||||
|
Loading…
Reference in New Issue
Block a user