]> git.eshelyaron.com Git - emacs.git/commitdiff
;Fix eldoc regression bug#42365
authorTassilo Horn <tsdh@gnu.org>
Wed, 15 Jul 2020 16:58:57 +0000 (18:58 +0200)
committerTassilo Horn <tsdh@gnu.org>
Wed, 15 Jul 2020 16:58:57 +0000 (18:58 +0200)
lisp/emacs-lisp/eldoc.el

index 1a009bdefac716dfff2a78feab58b6c0beb73e70..510dff9ed0bce0509efdaf0f6a54f5eee3d4c747 100644 (file)
@@ -495,8 +495,9 @@ Honor most of `eldoc-echo-area-use-multiline-p'."
                             (substitute-command-keys "\\[eldoc-doc-buffer]")))))))))
               ((= available 1)
                ;; Truncate "brutally." ; FIXME: use `eldoc-prefer-doc-buffer' too?
-               (truncate-string-to-width
-                (buffer-substring (point-min) (line-end-position 1)) width)))))
+               (with-current-buffer (eldoc-doc-buffer)
+                 (truncate-string-to-width
+                  (buffer-substring (point-min) (line-end-position 1)) width))))))
         (when echo-area-message
           (eldoc--message echo-area-message))))))