Explorar o código

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.
Nicolas Goaziou %!s(int64=14) %!d(string=hai) anos
pai
achega
7745ad28c3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lisp/org-list.el

+ 1 - 1
lisp/org-list.el

@@ -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