Browse Source

org-agenda.el: Fix call to `recenter'

* lisp/org-agenda.el (org-agenda-list): Fix call to `recenter'
when `org-agenda-buffer-name' is not known.
Bastien 5 months ago
parent
commit
164d30f5ab
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org-agenda.el

+ 1 - 1
lisp/org-agenda.el

@@ -4373,7 +4373,7 @@ items if they have an hour specification like [h]h:mm."
 	  (insert tbl)))
       (goto-char (point-min))
       (or org-agenda-multi (org-agenda-fit-window-to-buffer))
-      (unless (or (not (get-buffer-window))
+      (unless (or (not (get-buffer-window org-agenda-buffer-name))
 		  (and (pos-visible-in-window-p (point-min))
 		       (pos-visible-in-window-p (point-max))))
 	(goto-char (1- (point-max)))