From 60f758a24a1eb4816e20e45e492fe24948c1c936 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Tue, 11 Dec 2018 15:39:31 -0500 Subject: [PATCH] Speed up Originally I have (when str (display)), but that leaves childdrame unchanged. To work around that I added (eldoc-box-quit-frame). Now childframes are cleared up nicely but it lagging. (when (stringp str) (display)) works. (although I don't know why (when str) doesn't, even though eldoc-messaeg passes nil to message function) --- eldoc-box.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eldoc-box.el b/eldoc-box.el index 4367190..c066b07 100644 --- a/eldoc-box.el +++ b/eldoc-box.el @@ -175,8 +175,7 @@ Checkout `lsp-ui-doc--make-frame', `lsp-ui-doc--move-frame'." ;;;;; ElDoc (defun eldoc-box--eldoc-message-function (str &rest args) "Frontend for eldoc. Display STR in childframe and ARGS works like `message'." - (when str - (eldoc-box-quit-frame) + (when (stringp str) (let ((doc (apply #'format str args))) (if (and eldoc-box-only-multi-line (eq (cl-count ?\n doc) 0)) (apply #'eldoc-minibuffer-message str args)