From f3ed0f7c6c85487439511cfddaee6d32ca70b108 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Thu, 30 Jan 2014 12:21:39 +0100 Subject: [PATCH] org.el (org-refile): Fix bug when refiling the last subtree * org.el (org-refile): Fix bug when refiling the last subtree of the buffer: don't leave out the last character. --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index ded2dc78e..2067827bb 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -11629,7 +11629,7 @@ prefix argument (`C-u C-u C-u C-c C-w')." (delete-region (point) (+ (point) (- region-end region-start))) (delete-region (and (org-back-to-heading t) (point)) - (min (buffer-size) (org-end-of-subtree t t) (point))))) + (min (1+ (buffer-size)) (org-end-of-subtree t t) (point))))) (when (featurep 'org-inlinetask) (org-inlinetask-remove-END-maybe)) (setq org-markers-to-move nil)