>From e91f9a0767d0b9d749b91b86fa2d9000db8d211c Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Wed, 4 May 2022 14:24:31 +0200 Subject: [PATCH] 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. --- lisp/doc-view.el | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lisp/doc-view.el b/lisp/doc-view.el index e8698fad7e..22570dd510 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -632,17 +632,16 @@ doc-view-goto-page (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 -- 2.35.1