summaryrefslogtreecommitdiff
path: root/lisp/org/org-clock.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/org/org-clock.el')
-rw-r--r--lisp/org/org-clock.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el
index 41e799f9898..c0a45b3ad13 100644
--- a/lisp/org/org-clock.el
+++ b/lisp/org/org-clock.el
@@ -1656,7 +1656,8 @@ Optional argument N tells to change by that many units."
(save-excursion ; Do not replace this with `with-current-buffer'.
(org-no-warnings (set-buffer (org-clocking-buffer)))
(goto-char org-clock-marker)
- (if (org-looking-back (concat "^[ \t]*" org-clock-string ".*"))
+ (if (org-looking-back (concat "^[ \t]*" org-clock-string ".*")
+ (line-beginning-position))
(progn (delete-region (1- (point-at-bol)) (point-at-eol))
(org-remove-empty-drawer-at "LOGBOOK" (point)))
(message "Clock gone, cancel the timer anyway")