Don't show childframe when docstring is an empty string

This commit is contained in:
Yuan Fu 2019-05-29 16:31:01 +08:00
parent 0071538273
commit c97fe860fa
No known key found for this signature in database
GPG Key ID: 56E19BC57664A442

View File

@ -329,7 +329,7 @@ Checkout `lsp-ui-doc--make-frame', `lsp-ui-doc--move-frame'."
(defun eldoc-box--eldoc-message-function (str &rest args) (defun eldoc-box--eldoc-message-function (str &rest args)
"Front-end for eldoc. Display STR in childframe and ARGS works like `message'." "Front-end for eldoc. Display STR in childframe and ARGS works like `message'."
(when (stringp str) (when (and (stringp str) (not (equal str "")))
(let ((doc (apply #'format str args))) (let ((doc (apply #'format str args)))
(unless (and eldoc-box-only-multi-line (eq (cl-count ?\n doc) 0)) (unless (and eldoc-box-only-multi-line (eq (cl-count ?\n doc) 0))
(eldoc-box--display doc) (eldoc-box--display doc)