浏览代码

Correctly get bullet when point is not at bol.

Nicolas Goaziou 14 年之前
父节点
当前提交
421ba3a187
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      lisp/org-list.el

+ 3 - 1
lisp/org-list.el

@@ -1513,7 +1513,9 @@ The item must be empty."
 (defun org-get-bullet ()
   "Return the bullet of the item at point.
 Assume cursor is at an item."
-  (and (looking-at "[ \t]*\\(\\S-+\\)") (match-string 1)))
+  (save-excursion
+    (beginning-of-line)
+    (and (looking-at "[ \t]*\\(\\S-+\\)") (match-string 1))))
 
 (defun org-list-bullet-string (bullet)
   "Return BULLET with the correct number of whitespaces.