Explorar o código

org-agenda.el (org-agenda-finalize): Only try to draw the habit consistency graph when there is a habit in the buffer

* org-agenda.el (org-agenda-finalize): Only try to draw the
habit consistency graph when there is a habit in the buffer.
Bastien Guerry %!s(int64=13) %!d(string=hai) anos
pai
achega
cd00d36ca2
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      lisp/org-agenda.el

+ 2 - 1
lisp/org-agenda.el

@@ -3545,7 +3545,8 @@ generating a new one."
       (when org-agenda-entry-text-mode
 	(org-agenda-entry-text-hide)
 	(org-agenda-entry-text-show))
-      (if (functionp 'org-habit-insert-consistency-graphs)
+      (if (and (functionp 'org-habit-insert-consistency-graphs)
+	       (save-excursion (next-single-property-change (point-min) 'org-habit-p)))
 	  (org-habit-insert-consistency-graphs))
       (let ((inhibit-read-only t))
 	(run-hooks 'org-agenda-finalize-hook))