emacs-diffs
[Top][All Lists]
Advanced

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

master ffb99d8 1/2: Prevent infloop in Eldoc message truncation algorith


From: João Távora
Subject: master ffb99d8 1/2: Prevent infloop in Eldoc message truncation algorithm
Date: Thu, 9 Jul 2020 13:08:09 -0400 (EDT)

branch: master
commit ffb99d84900e47697c9f20a914e86d39e9bcd8b4
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    Prevent infloop in Eldoc message truncation algorithm
    
    The truncation algorithm still has a long way to go for very narrow
    frame sizes.  It should become a generic mechanism that would allows
    one to truncate a string so that fits in N possibly truncated screen
    lines of a full-width window.
    
    * lisp/emacs-lisp/eldoc.el (eldoc-handle-docs): Tweak
---
 lisp/emacs-lisp/eldoc.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 9efd770..24b6cec 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -479,7 +479,7 @@ Honor most of `eldoc-echo-area-use-multiline-p'."
                  (count-screen-lines (point-min) (point) t 
(minibuffer-window)))
              while (> needed (if truncated (1- available) available))
              do (goto-char (line-end-position (if truncated 0 -1)))
-             (while (bolp) (goto-char (line-end-position 0)))
+             (while (and (not (bobp)) (bolp)) (goto-char (line-end-position 
0)))
              finally
              (unless (and truncated
                           eldoc-prefer-doc-buffer



reply via email to

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