Browse Source

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.
Bastien Guerry 11 years ago
parent
commit
f3ed0f7c6c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org.el

+ 1 - 1
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 (point) (+ (point) (- region-end region-start)))
 		(delete-region
 		(delete-region
 		 (and (org-back-to-heading t) (point))
 		 (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)
 	    (when (featurep 'org-inlinetask)
 	      (org-inlinetask-remove-END-maybe))
 	      (org-inlinetask-remove-END-maybe))
 	    (setq org-markers-to-move nil)
 	    (setq org-markers-to-move nil)