Bugfix: Swapping the last two subtrees in a file.

Rustom Mody writes:

>  The last two lines of my org file are
>
>  *** Vishnu Sahasranam
>  *** Ram Navami
>
>  without a newline at the end
>
>  Trying to reorder these two lines I do a M-S-down on second last
>  line I get
>
>  *** Ram Navami*** Vishnu Sahasranam
This commit is contained in:
Carsten Dominik 2009-03-30 17:36:55 +02:00
parent b071a1097e
commit 95f4088990
2 changed files with 3 additions and 0 deletions

View file

@ -2,6 +2,8 @@
* org.el (org-modules): Add org-inlinetasks.el
(org-cycle): Implement limiting level on cycling.
(org-move-subtree-down): Fix bug with swapping subtrees at end of
buffer.
* org-inlinetask.el: New file.

View file

@ -5609,6 +5609,7 @@ is signaled in this case."
(delete-region beg end)
(or (= beg (point-min)) (outline-flag-region (1- beg) beg nil))
(or (bobp) (outline-flag-region (1- (point)) (point) nil))
(and (not (bolp)) (looking-at "\n") (forward-char 1))
(let ((bbb (point)))
(insert-before-markers txt)
(org-reinstall-markers-in-region bbb)