Fix `org-list-insert-item-generic' when checkboxes are updated

* org-list.el (org-list-insert-item-generic): Updating checkboxes can
  modifiy bottom point of a list, so make it a marker before calling
  `org-update-checkbox-count-maybe'.
This commit is contained in:
Nicolas Goaziou 2010-09-07 18:55:46 +02:00 committed by David Maus
parent 569ba0eee8
commit 7e8aec9c09
1 changed files with 3 additions and 0 deletions

View File

@ -669,6 +669,9 @@ function ends."
;; recompute next-item: last sexp modified list
(goto-char (org-get-next-item (point) bottom))
(org-move-to-column col)))
;; checkbox update might modify bottom point, so use a
;; marker here
(setq bottom (copy-marker bottom))
(when checkbox (org-update-checkbox-count-maybe))
(org-list-repair nil top bottom))))
(goto-char true-pos)