Ver código fonte

Merge branch 'maint'

Conflicts:
	testing/lisp/test-org-element.el
Nicolas Goaziou 11 anos atrás
pai
commit
95dd398f6a
2 arquivos alterados com 7 adições e 3 exclusões
  1. 1 2
      lisp/org-element.el
  2. 6 1
      testing/lisp/test-org-element.el

+ 1 - 2
lisp/org-element.el

@@ -1261,8 +1261,7 @@ Assume point is at the beginning of the list."
 		   (unless (bolp) (forward-line))
 		   (point)))
 	   (end (progn (skip-chars-forward " \r\t\n" limit)
-		       (skip-chars-backward " \t")
-		       (if (bolp) (point) (line-end-position)))))
+		       (if (= (point) limit) limit (line-beginning-position)))))
       ;; Return value.
       (list 'plain-list
 	    (nconc

+ 6 - 1
testing/lisp/test-org-element.el

@@ -1511,7 +1511,12 @@ Outside list"
 	 ;; Move to ending of outer list.
 	 (progn (goto-char (car endings)) (looking-at "Outside list"))
 	 ;; Move to ending of inner list.
-	 (progn (goto-char (nth 1 endings)) (looking-at "^$"))))))))
+	 (progn (goto-char (nth 1 endings)) (looking-at "^$")))))))
+  ;; Correctly compute end of list if it doesn't end at a line
+  ;; beginning.
+  (should
+   (org-test-with-temp-text "- list\n   \n   "
+     (= (org-element-property :end (org-element-at-point)) (point-max)))))
 
 
 ;;;; Planning