瀏覽代碼

Don't move line upward if point is at eob

* org.el (org-back-over-empty-lines): Don't move line upward if point
is at eob.

Fixes a bug with refiling reported by Bernt Hansen, simplified version
of fix proposed by Jason Dunsmore.
David Maus 13 年之前
父節點
當前提交
049c0776ff
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lisp/org.el

+ 2 - 1
lisp/org.el

@@ -19212,7 +19212,8 @@ Returns the number of empty lines passed."
   (let ((pos (point)))
     (if (cdr (assoc 'heading org-blank-before-new-entry))
        (skip-chars-backward " \t\n\r")
-      (forward-line -1))
+      (unless (eobp)
+	(forward-line -1)))
     (beginning-of-line 2)
     (goto-char (min (point) pos))
     (count-lines (point) pos)))