Selaa lähdekoodia

Merge branch 'maint'

Nicolas Goaziou 5 vuotta sitten
vanhempi
commit
1b3c7c28cf
1 muutettua tiedostoa jossa 6 lisäystä ja 3 poistoa
  1. 6 3
      lisp/org-agenda.el

+ 6 - 3
lisp/org-agenda.el

@@ -4201,9 +4201,12 @@ items if they have an hour specification like [h]h:mm."
                           ((= w1 w2) (format " (W%02d)" w1))
                           (t (format " (W%02d-W%02d)" w1 w2)))
 		    ":\n")))
-	(add-text-properties s (1- (point)) (list 'face 'org-agenda-structure
-						  'org-date-line t))
-	(org-agenda-mark-header-line s))
+	;; Add properties if we actually inserted a header.
+	(when (> (point) s)
+	  (add-text-properties s (1- (point))
+			       (list 'face 'org-agenda-structure
+				     'org-date-line t))
+	  (org-agenda-mark-header-line s)))
       (while (setq d (pop day-numbers))
 	(setq date (calendar-gregorian-from-absolute d)
 	      s (point))