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.
This commit is contained in:
David Maus 2011-08-04 16:05:08 +02:00
parent 4db8048a23
commit 049c0776ff
1 changed files with 2 additions and 1 deletions

View File

@ -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)))