瀏覽代碼

org-clock: Clear org-clock-current-task on clock cancel

* org-mode/lisp/org-clock.el (org-clock-cancel): Clear
`org-clock-current-task' when a clock is canceled.

This variable is used by some mode line packages (e.g.,
spaceline-all-the-icons), so not clearing the variable incorrectly
displays the previous task as ongoing.
Aaron L. Zeng 5 年之前
父節點
當前提交
1b74ae0ba3
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      lisp/org-clock.el

+ 1 - 0
lisp/org-clock.el

@@ -1741,6 +1741,7 @@ Optional argument N tells to change by that many units."
       (sit-for 2)))
   (move-marker org-clock-marker nil)
   (move-marker org-clock-hd-marker nil)
+  (setq org-clock-current-task nil)
   (setq global-mode-string
 	(delq 'org-mode-line-string global-mode-string))
   (org-clock-restore-frame-title-format)