diff options
author | Philip Kaludercic <philipk@posteo.net> | 2022-05-04 14:24:31 +0200 |
---|---|---|
committer | Philip Kaludercic <philipk@posteo.net> | 2022-05-05 13:15:11 +0200 |
commit | be374c18b3305ebfe38936bc5d66a78d5cb31318 (patch) | |
tree | 3d3eadad765aa654739f25c9d2f3600bdd509c57 | |
parent | a4e5fdf97582003760f6818fd6266e537d2fc207 (diff) | |
download | emacs-be374c18b3305ebfe38936bc5d66a78d5cb31318.tar.gz emacs-be374c18b3305ebfe38936bc5d66a78d5cb31318.tar.bz2 emacs-be374c18b3305ebfe38936bc5d66a78d5cb31318.zip |
Avoid resizing mini buffer when displaying page numbers
* doc-view.el (doc-view-goto-page): Do not insert a newline at the end
of the "current info" if not necessary.
-rw-r--r-- | lisp/doc-view.el | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index e8698fad7e7..22570dd5103 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -632,17 +632,16 @@ Typically \"page-%s.png\".") (propertize (format "Page %d of %d." page len) 'face 'bold) ;; Tell user if converting isn't finished yet - (if doc-view--current-converter-processes - " (still converting...)\n" - "\n") - ;; Display context infos if this page matches the last search - (when (and doc-view--current-search-matches - (assq page doc-view--current-search-matches)) - (concat (propertize "Search matches:\n" 'face 'bold) + (and doc-view--current-converter-processes + " (still converting...)") + ;; Display context infos if this page matches the last search + (when (and doc-view--current-search-matches + (assq page doc-view--current-search-matches)) + (concat "\n" (propertize "Search matches:" 'face 'bold) (let ((contexts "")) (dolist (m (cdr (assq page doc-view--current-search-matches))) - (setq contexts (concat contexts " - \"" m "\"\n"))) + (setq contexts (concat contexts "\n - \"" m "\""))) contexts))))) ;; Update the buffer ;; We used to find the file name from doc-view--current-files but |