Browse Source

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.
Nicolas Goaziou 8 years ago
parent
commit
ce0d35a51c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org-list.el

+ 1 - 1
lisp/org-list.el

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