浏览代码

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 14 年之前
父节点
当前提交
ce0d35a51c
共有 1 个文件被更改,包括 1 次插入1 次删除
  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