summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2010-09-07 18:55:46 +0200
committerDavid Maus <dmaus@ictsoc.de>2010-09-07 19:36:05 +0200
commit7e8aec9c09d86b8a88238235689e51810882ee20 (patch)
tree34e9717bf1d4389c31e90c4c2af03248d4f9a310
parent569ba0eee847406b70b345cae6e3e696f027a621 (diff)
downloadorg-mode-7e8aec9c09d86b8a88238235689e51810882ee20.tar.gz
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'.
-rw-r--r--lisp/org-list.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/org-list.el b/lisp/org-list.el
index b58a23d..a5160c1 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -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)