org-list: fix checkbox toggling

* lisp/org-list.el (org-toggle-checkbox): fix bug where top item in
  list was omitted when checking boxes.

Patch from Nick Dokos.
This commit is contained in:
Nicolas Goaziou 2011-02-25 18:16:24 +01:00
parent b23d35de06
commit 7745ad28c3
1 changed files with 1 additions and 1 deletions

View File

@ -2134,7 +2134,7 @@ in subtree, ignoring drawers."
(bottom (copy-marker (org-list-get-bottom-point struct)))
(items-to-toggle (org-remove-if
(lambda (e) (or (< e lim-up) (> e lim-down)))
(mapcar 'car (cdr struct)))))
(mapcar 'car struct))))
(mapc (lambda (e) (org-list-set-checkbox
e struct
;; if there is no box at item, leave as-is