Remove unnecessary check for empty string in eldoc-box--display
* eldoc-box.el (eldoc-box--display): Now we require the caller to make sure the string is not empty.
This commit is contained in:
parent
646ae5cdd8
commit
6fbb6e3e19
@ -185,8 +185,8 @@ Intended for internal use."
|
|||||||
;;;;; Function
|
;;;;; Function
|
||||||
|
|
||||||
(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
|
STR has to be a proper documentation, not empty string, not nil, etc."
|
||||||
(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)
|
||||||
@ -200,7 +200,7 @@ Intended for internal use."
|
|||||||
(insert str)
|
(insert str)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(run-hook-with-args 'eldoc-box-buffer-hook))
|
(run-hook-with-args 'eldoc-box-buffer-hook))
|
||||||
(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