From 463ae961086cbc722034a2f87f2fe0e0f80f298b Mon Sep 17 00:00:00 2001 From: jao Date: Fri, 23 Sep 2022 01:06:24 +0100 Subject: eldoc improvements; minibuffer aware it uses invisible text sometimes --- lib/eos/jao-minibuffer.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/eos') diff --git a/lib/eos/jao-minibuffer.el b/lib/eos/jao-minibuffer.el index 40dabf4..50c17a8 100644 --- a/lib/eos/jao-minibuffer.el +++ b/lib/eos/jao-minibuffer.el @@ -78,9 +78,10 @@ (unless (string-blank-p p) (concat p "\n")))) (defun jao-minibuffer--format-msg (msg) - (let* ((msgs (mapcar #'jao-minibuffer--strip-prev (split-string msg "\n"))) + (let* ((msgs (mapcar #'jao-minibuffer--strip-prev (split-string msg "\n" t))) + (msgs (cl-remove-if (lambda (s) (get-text-property 0 'invisible s)) msgs)) (prefix (jao-minibuffer--prefix msgs)) - (msg (car (last msgs))) + (msg (or (car (last msgs)) "")) (w (string-width msg))) (if jao-minibuffer-align-right (concat prefix msg (jao-minibuffer--aligned w)) -- cgit v1.2.3