Browse Source

Fix commit e31955.

Thanks to Samuel for reporting this.
Bastien Guerry 11 years ago
parent
commit
13c4d7f6e1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lisp/org.el

+ 2 - 2
lisp/org.el

@@ -11585,8 +11585,8 @@ prefix argument (`C-u C-u C-u C-c C-w')."
 	      (if regionp
 		  (delete-region (point) (+ (point) (- region-end region-start)))
 		(delete-region
-		 (point-at-bol)
-		 (min (buffer-size) (1+ (org-end-of-subtree t))))))
+		 (and (org-back-to-heading t) (point))
+		 (min (buffer-size) (org-end-of-subtree t t) (point)))))
 	    (when (featurep 'org-inlinetask)
 	      (org-inlinetask-remove-END-maybe))
 	    (setq org-markers-to-move nil)