]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix off-by-one error in eldoc--handle-docs
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 22 Sep 2020 14:20:05 +0000 (16:20 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 22 Sep 2020 14:20:05 +0000 (16:20 +0200)
* lisp/emacs-lisp/eldoc.el (eldoc--handle-docs): We have one extra
line to use if we don't show the truncation message (bug#43543).

lisp/emacs-lisp/eldoc.el

index 8fc8db62220cb937643b338f2502e20978965a4f..9e38e5908edac630b69197dd57ed43061ce5af22 100644 (file)
@@ -510,6 +510,10 @@ Honor most of `eldoc-echo-area-use-multiline-p'."
                 (> (+ (length single-doc) (length single-doc-sym) 2) width))
                single-doc)
               ((> available 1)
+               ;; The message takes one extra line, so if we don't
+               ;; display that, we have one extra line to use.
+               (unless eldoc-display-truncation-message
+                 (setq available (1+ available)))
                (with-current-buffer (eldoc-doc-buffer)
                  (cl-loop
                   initially