FIX don't add extra datetime when repeat happens to land on selected date
This commit is contained in:
parent
8fbf8afd10
commit
85be0e64bd
|
@ -2699,7 +2699,6 @@ encountered will be returned."
|
||||||
(unless (car it)
|
(unless (car it)
|
||||||
(let* ((next (org-x-dag-datetime-shift (cdr it) shift shifttype))
|
(let* ((next (org-x-dag-datetime-shift (cdr it) shift shifttype))
|
||||||
(futurep (org-x-dag-datetime< sel-datetime next)))
|
(futurep (org-x-dag-datetime< sel-datetime next)))
|
||||||
;; (futurep (org-x-dag-date< sel-datetime next)))
|
|
||||||
`(,next . (,futurep . ,next)))))
|
`(,next . (,futurep . ,next)))))
|
||||||
(-last-item)))
|
(-last-item)))
|
||||||
('restart
|
('restart
|
||||||
|
@ -2722,10 +2721,13 @@ FUTURE-LIMIT in a list."
|
||||||
(pcase rep
|
(pcase rep
|
||||||
(`nil `(,datetime))
|
(`nil `(,datetime))
|
||||||
(`(,value ,unit ,reptype)
|
(`(,value ,unit ,reptype)
|
||||||
(->> (org-x-dag-repeater-get-next cur datetime value unit reptype)
|
(let* ((next (org-x-dag-repeater-get-next cur datetime value unit reptype))
|
||||||
(--unfold (when (org-x-dag-datetime< it future-limit)
|
(reps
|
||||||
(cons it (org-x-dag-datetime-shift it value unit))))
|
(--unfold (when (org-x-dag-datetime< it future-limit)
|
||||||
(cons datetime))))))
|
(cons it (org-x-dag-datetime-shift it value unit)))
|
||||||
|
next)))
|
||||||
|
(if (org-x-dag-datetime= next datetime) reps
|
||||||
|
(cons datetime reps)))))))
|
||||||
|
|
||||||
(defun org-x-dag-get-scheduled-at (sel-date pts)
|
(defun org-x-dag-get-scheduled-at (sel-date pts)
|
||||||
(-let* (((&plist :datetime d :repeater r) pts)
|
(-let* (((&plist :datetime d :repeater r) pts)
|
||||||
|
|
Loading…
Reference in New Issue