Fix: empty childframe when used with lsp-mode
lsp-mode returns empty string as documentation from time to time, add a workaround to ignore that
This commit is contained in:
parent
2f5910325d
commit
03d075eda6
@ -169,6 +169,7 @@ You can use C-g to hide the doc."
|
|||||||
|
|
||||||
(defun eldoc-box--display (str)
|
(defun eldoc-box--display (str)
|
||||||
"Display STR in childframe."
|
"Display STR in childframe."
|
||||||
|
(unless (equal str "") ; WORKAROUND lsp returns empty string from time to time
|
||||||
(let ((doc-buffer (get-buffer-create eldoc-box--buffer)))
|
(let ((doc-buffer (get-buffer-create eldoc-box--buffer)))
|
||||||
(with-current-buffer doc-buffer
|
(with-current-buffer doc-buffer
|
||||||
(setq mode-line-format nil)
|
(setq mode-line-format nil)
|
||||||
@ -177,7 +178,7 @@ You can use C-g to hide the doc."
|
|||||||
(setq eldoc-box-hover-mode t)
|
(setq eldoc-box-hover-mode t)
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(insert str))
|
(insert str))
|
||||||
(eldoc-box--get-frame doc-buffer)))
|
(eldoc-box--get-frame doc-buffer))))
|
||||||
|
|
||||||
|
|
||||||
(defun eldoc-box--window-side ()
|
(defun eldoc-box--window-side ()
|
||||||
|
Loading…
Reference in New Issue
Block a user