Explorar o código

Correctly get bullet when point is not at bol.

Nicolas Goaziou %!s(int64=14) %!d(string=hai) anos
pai
achega
421ba3a187
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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.