* lisp/org.el (org-toggle-item): Fix ae0f1c56a7.
This commit is contained in:
Nicolas Goaziou 2014-01-19 18:15:56 +01:00
parent 848d1926ec
commit 5f04b3815f
1 changed files with 7 additions and 3 deletions

View File

@ -20680,10 +20680,14 @@ With a prefix argument ARG, change the region in a single item."
(replace-match bul t t) (replace-match bul t t)
(org-indent-line-to (+ start-ind (* delta bul-len))) (org-indent-line-to (+ start-ind (* delta bul-len)))
(when (or done todo) (when (or done todo)
(let ((struct (org-list-struct))) (let* ((struct (org-list-struct))
(org-list-set-checkbox (point) struct (if done "[X]" "[ ]")) (old (copy-tree struct)))
(org-list-set-checkbox (line-beginning-position)
struct
(if done "[X]" "[ ]"))
(org-list-write-struct struct (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 ;; Ensure all text down to END (or SECTION-END) belongs
;; to the newly created item. ;; to the newly created item.
(let ((section-end (save-excursion (let ((section-end (save-excursion