浏览代码

Fixed incorrect value returned from `org-habit-deadline'

John Wiegley 15 年之前
父节点
当前提交
706129c0c4
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      lisp/org-habit.el

+ 4 - 2
lisp/org-habit.el

@@ -178,8 +178,10 @@ This list represents a \"habit\" for the rest of this module."
 (defsubst org-habit-deadline (habit)
   (let ((deadline (nth 2 habit)))
     (or deadline
-	(+ (org-habit-scheduled habit)
-	   (1- (org-habit-scheduled-repeat habit))))))
+	(if (nth 3 habit)
+	    (+ (org-habit-scheduled habit)
+	       (1- (org-habit-scheduled-repeat habit)))
+	  (org-habit-scheduled habit)))))
 (defsubst org-habit-deadline-repeat (habit)
   (or (nth 3 habit)
       (org-habit-scheduled-repeat habit)))