diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2014-01-19 18:15:56 +0100 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2014-01-19 18:15:56 +0100 |
commit | 5f04b3815f110651f4847fcc93778864d6a41560 (patch) | |
tree | 86202cfac3a8b9e47b394723e2f2dfb1aa91718d | |
parent | 848d1926ec96683bfb9be28e5c9c2f0126d3d3a3 (diff) | |
download | org-mode-5f04b3815f110651f4847fcc93778864d6a41560.tar.gz |
Fix ae0f1c56a7934cde23d30e5481510cbe79562fea
* lisp/org.el (org-toggle-item): Fix ae0f1c56a7934cde23d30e5481510cbe79562fea.
-rw-r--r-- | lisp/org.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/org.el b/lisp/org.el index 5589ecb..cba8c30 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -20680,10 +20680,14 @@ With a prefix argument ARG, change the region in a single item." (replace-match bul t t) (org-indent-line-to (+ start-ind (* delta bul-len))) (when (or done todo) - (let ((struct (org-list-struct))) - (org-list-set-checkbox (point) struct (if done "[X]" "[ ]")) + (let* ((struct (org-list-struct)) + (old (copy-tree struct))) + (org-list-set-checkbox (line-beginning-position) + struct + (if done "[X]" "[ ]")) (org-list-write-struct struct - (org-list-parents-alist struct)))) + (org-list-parents-alist struct) + old))) ;; Ensure all text down to END (or SECTION-END) belongs ;; to the newly created item. (let ((section-end (save-excursion |