emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 73f7755: Fix off-by-one error in eldoc--handle-docs


From: Lars Ingebrigtsen
Subject: master 73f7755: Fix off-by-one error in eldoc--handle-docs
Date: Tue, 22 Sep 2020 10:20:13 -0400 (EDT)

branch: master
commit 73f77558ccd5f0d83af294676eedfce3aa1bb4cb
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix off-by-one error in eldoc--handle-docs
    
    * 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 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 8fc8db6..9e38e59 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]