aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Távora2020-07-09 17:51:38 +0100
committerJoão Távora2020-07-09 18:07:22 +0100
commitffb99d84900e47697c9f20a914e86d39e9bcd8b4 (patch)
tree613cb3fc04b00a4ff0bfdf83066a0f90fb2340a7
parent19cf8e5be7c1b02dbc0831d8b64560533a59587c (diff)
downloademacs-ffb99d84900e47697c9f20a914e86d39e9bcd8b4.tar.gz
emacs-ffb99d84900e47697c9f20a914e86d39e9bcd8b4.zip
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
-rw-r--r--lisp/emacs-lisp/eldoc.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 9efd770dca6..24b6ceca48a 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'."
479 (count-screen-lines (point-min) (point) t (minibuffer-window))) 479 (count-screen-lines (point-min) (point) t (minibuffer-window)))
480 while (> needed (if truncated (1- available) available)) 480 while (> needed (if truncated (1- available) available))
481 do (goto-char (line-end-position (if truncated 0 -1))) 481 do (goto-char (line-end-position (if truncated 0 -1)))
482 (while (bolp) (goto-char (line-end-position 0))) 482 (while (and (not (bobp)) (bolp)) (goto-char (line-end-position 0)))
483 finally 483 finally
484 (unless (and truncated 484 (unless (and truncated
485 eldoc-prefer-doc-buffer 485 eldoc-prefer-doc-buffer