Fix frame cleanup problem
I forgot to change the frame creation part to follow up with the change to reuse frame instead of deleting them
This commit is contained in:
parent
5bb3e5533e
commit
34004bf492
11
eldoc-box.el
11
eldoc-box.el
@ -130,11 +130,13 @@ 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 (display-buffer-in-child-frame
|
(window (or (and eldoc-box--frame (frame-selected-window eldoc-box--frame))
|
||||||
|
(display-buffer-in-child-frame
|
||||||
buffer
|
buffer
|
||||||
`((child-frame-parameters . ,parameter))))
|
`((child-frame-parameters . ,parameter)))))
|
||||||
(frame (window-frame window))
|
(frame (window-frame window))
|
||||||
(main-frame (selected-frame)))
|
(main-frame (selected-frame)))
|
||||||
|
(make-frame-visible frame)
|
||||||
(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)
|
||||||
@ -163,11 +165,12 @@ Checkout `lsp-ui-doc--make-frame', `lsp-ui-doc--move-frame'."
|
|||||||
;;;;; ElDoc
|
;;;;; ElDoc
|
||||||
(defun eldoc-box--eldoc-message-function (str &rest args)
|
(defun eldoc-box--eldoc-message-function (str &rest args)
|
||||||
"Frontend for eldoc. Display STR in childframe and ARGS works like `message'."
|
"Frontend for eldoc. Display STR in childframe and ARGS works like `message'."
|
||||||
(when (stringp str)
|
(if (stringp str)
|
||||||
(let ((doc (apply #'format str args)))
|
(let ((doc (apply #'format str args)))
|
||||||
(if (and eldoc-box-only-multi-line (eq (cl-count ?\n doc) 0))
|
(if (and eldoc-box-only-multi-line (eq (cl-count ?\n doc) 0))
|
||||||
(apply #'eldoc-minibuffer-message str args)
|
(apply #'eldoc-minibuffer-message str args)
|
||||||
(eldoc-box--display (apply #'format str args))))))
|
(eldoc-box--display (apply #'format str args))))
|
||||||
|
(eldoc-box-quit-frame)))
|
||||||
|
|
||||||
(define-minor-mode eldoc-box-hover-mode
|
(define-minor-mode eldoc-box-hover-mode
|
||||||
"Displays hover documentations in a childframe. This mode is buffer local."
|
"Displays hover documentations in a childframe. This mode is buffer local."
|
||||||
|
Loading…
Reference in New Issue
Block a user