org-agenda.el (org-agenda-finalize): Only mark clocking task when there is one

* org-agenda.el (org-agenda-finalize): Only mark clocking task
when there is one.
This commit is contained in:
Bastien Guerry 2013-01-06 09:11:08 +01:00
parent 7fe67bb942
commit f1191b86e3
1 changed files with 4 additions and 3 deletions

View File

@ -3538,9 +3538,10 @@ generating a new one."
(org-agenda-dim-blocked-tasks)) (org-agenda-dim-blocked-tasks))
;; We need to widen when `org-agenda-finalize' is called from ;; We need to widen when `org-agenda-finalize' is called from
;; `org-agenda-change-all-lines' (e.g. in `org-agenda-clock-in') ;; `org-agenda-change-all-lines' (e.g. in `org-agenda-clock-in')
(save-restriction (when org-clock-current-task
(widen) (save-restriction
(org-agenda-mark-clocking-task)) (widen)
(org-agenda-mark-clocking-task)))
(when org-agenda-entry-text-mode (when org-agenda-entry-text-mode
(org-agenda-entry-text-hide) (org-agenda-entry-text-hide)
(org-agenda-entry-text-show)) (org-agenda-entry-text-show))