Fix "invalid search bound" when toggling a checkbox

* org-list.el (org-toggle-checkbox): avoid some boundary error when
  inserting a checkbox in an empty last item of a list.
This commit is contained in:
Nicolas Goaziou 2010-09-30 21:55:45 +02:00 committed by David Maus
parent 584adacf20
commit ce0d35a51c
1 changed files with 1 additions and 1 deletions

View File

@ -1699,7 +1699,7 @@ in subtree, ignoring drawers."
org-item-beginning-re limit 'move)
(list (point) limit nil))))
((org-at-item-p)
(list (point-at-bol) (point-at-eol) t))
(list (point-at-bol) (1+ (point-at-eol)) t))
(t (error "Not at an item or heading, and no active region"))))
(beg (car bounds))
;; marker is needed because deleting or inserting checkboxes