Explorar o código

org.el (org-timestamp-change): Don't use the `position'.

* org.el (org-timestamp-change): Don't use the `position'.
Bastien Guerry %!s(int64=13) %!d(string=hai) anos
pai
achega
8f5b9b2bdf
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      lisp/org.el

+ 2 - 1
lisp/org.el

@@ -16325,7 +16325,8 @@ in the timestamp determines what will be changed."
 	  (org-back-to-heading t)
 	  (let* ((cl (mapcar (lambda(c) (abs (- (marker-position c) (point))))
 			     org-clock-history))
-		 (clfixnth (+ fixnext (position (apply #'min cl) cl)))
+		 (clfixnth
+		  (+ fixnext (- (length cl) (or (length (member (apply #'min cl) cl)) 100))))
 		 (clfixpos (if (> 0 clfixnth) nil (nth clfixnth org-clock-history))))
 	    (if (not clfixpos)
 		(message "No clock to adjust")