Fix overlay breakage when updating statistics cookies
* lisp/org.el (org-update-parent-todo-statistics): Do not move overlay
when updating statistics cookies.
Overlay moving was introduced in
28b88bbb11
to fix a bug that no longer
seems to be reproducible. In any case, even if needed, this fix should
happen in "org-colview.el".
Reported-by: Clément Pit--Claudel <clement.pitclaudel@live.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/108601>
This commit is contained in:
parent
af181d315a
commit
ff9ae29d03
|
@ -13011,7 +13011,7 @@ statistics everywhere."
|
|||
(box-re "\\(\\(\\[[0-9]*%\\]\\)\\|\\(\\[[0-9]*/[0-9]*\\]\\)\\)")
|
||||
level ltoggle l1 new ndel
|
||||
(cnt-all 0) (cnt-done 0) is-percent kwd
|
||||
checkbox-beg ov ovs ove cookie-present)
|
||||
checkbox-beg cookie-present)
|
||||
(catch 'exit
|
||||
(save-excursion
|
||||
(beginning-of-line 1)
|
||||
|
@ -13078,15 +13078,10 @@ statistics everywhere."
|
|||
(max 1 cnt-all)))
|
||||
(format "[%d/%d]" cnt-done cnt-all))
|
||||
ndel (- (match-end 0) checkbox-beg))
|
||||
;; handle overlays when updating cookie from column view
|
||||
(when (setq ov (car (overlays-at checkbox-beg)))
|
||||
(setq ovs (overlay-start ov) ove (overlay-end ov))
|
||||
(delete-overlay ov))
|
||||
(goto-char checkbox-beg)
|
||||
(insert new)
|
||||
(delete-region (point) (+ (point) ndel))
|
||||
(when org-auto-align-tags (org-fix-tags-on-the-fly))
|
||||
(when ov (move-overlay ov ovs ove)))
|
||||
(when org-auto-align-tags (org-fix-tags-on-the-fly)))
|
||||
(when cookie-present
|
||||
(run-hook-with-args 'org-after-todo-statistics-hook
|
||||
cnt-done (- cnt-all cnt-done))))))
|
||||
|
|
Loading…
Reference in New Issue