Parcourir la source

Lists: Fix bug with lists at the end of a file

Now org-end-of-item-list does find the end of the buffer if that is
where the lists ends.
Carsten Dominik il y a 16 ans
Parent
commit
f756d17bcf
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      lisp/org-list.el

+ 3 - 1
lisp/org-list.el

@@ -889,7 +889,9 @@ I.e. to the text after the last item."
 	(catch 'next
 	  (beginning-of-line 2)
 	  (if (looking-at "[ \t]*$")
-	      (throw (if (eobp) 'exit 'next) t))
+	      (if (eobp)
+		  (progn (setq pos (point)) (throw 'exit t))
+		(throw 'next t)))
 	  (skip-chars-forward " \t") (setq ind1 (current-column))
 	  (if (or (< ind1 ind)
 		  (and (= ind1 ind)