]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid resizing mini buffer when displaying page numbers
authorPhilip Kaludercic <philipk@posteo.net>
Wed, 4 May 2022 12:24:31 +0000 (14:24 +0200)
committerPhilip Kaludercic <philipk@posteo.net>
Thu, 5 May 2022 11:15:11 +0000 (13:15 +0200)
* 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

index e8698fad7e72dcbef85cb242cbeafc67f50c2c11..22570dd5103569e494985ee75c6d1644f1b1f3d5 100644 (file)
@@ -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