Browse Source

org.el (org-sort-entries): Fix the number of blank lines to keep for the last entry to sort

* org.el (org-sort-entries): Fix the number of blank lines to
keep for the last entry to sort.

Thanks to Kyle Meyer for raising this issue.
Bastien Guerry 11 years ago
parent
commit
a937366e8a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lisp/org.el

+ 2 - 1
lisp/org.el

@@ -8639,7 +8639,8 @@ links."
       (setq start (point)
 	    end (progn (org-end-of-subtree t t)
 		       (or (bolp) (insert "\n"))
-		       (org-back-over-empty-lines)
+		       (when (>= (org-back-over-empty-lines) 1)
+			 (forward-line 1))
 		       (point))
 	    what "children")
       (goto-char start)