Browse Source

habit: Fix color of habit for the very first done

* lisp/org-habit.el (org-habit-build-graph): Check if on the very
first "done" and set the standard color for done.

Recent behavior: Give that very first done the color to mean "done
ahead of schedule".
Marco Wahl 4 years ago
parent
commit
f471768a54
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lisp/org-habit.el

+ 3 - 1
lisp/org-habit.el

@@ -343,7 +343,9 @@ current time."
 	      (if (and in-the-past-p
 		       (not last-done-date)
 		       (not (< scheduled now)))
-		  '(org-habit-clear-face . org-habit-clear-future-face)
+		  (if (= start (car all-done-dates))
+		      '(org-habit-ready-face . org-habit-ready-future-face)
+		    '(org-habit-clear-face . org-habit-clear-future-face))
 		(org-habit-get-faces
 		 habit start
 		 (and in-the-past-p