summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Maus <dmaus@ictsoc.de>2011-08-04 16:05:08 +0200
committerDavid Maus <dmaus@ictsoc.de>2011-08-04 16:05:08 +0200
commit049c0776ff35ac006ef6be09bf931b0d8e67b426 (patch)
tree812a883f0d796f9cfffa314d57a4e62e6cfa577e
parent4db8048a23415a8f454badba0b2b1f1a938c5500 (diff)
downloadorg-mode-049c0776ff35ac006ef6be09bf931b0d8e67b426.tar.gz
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.
-rw-r--r--lisp/org.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el
index c7b28dd..9df6839 100644
--- a/lisp/org.el
+++ b/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)))