forked from mirrors/org-mode
Fix problem with moving trees in XEmacs.
Moving trees up or down with XEmacs caused a problem when the tree is at the beginning if the buffer or narrowed region. This patch protects the relevant calls to outline-flag-region so that they are only executed if the range is valid.
This commit is contained in:
parent
4298df987b
commit
520ff98609
|
@ -1,6 +1,8 @@
|
|||
2008-12-05 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.el (org-target-link-regexp): Make buffer-local.
|
||||
(org-move-subtree-down): Fix bug with trees at beginning of
|
||||
buffer.
|
||||
|
||||
2008-12-04 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
|
|
|
@ -5107,8 +5107,8 @@ is signaled in this case."
|
|||
(setq txt (buffer-substring beg end))
|
||||
(org-save-markers-in-region beg end)
|
||||
(delete-region beg end)
|
||||
(outline-flag-region (1- beg) beg nil)
|
||||
(outline-flag-region (1- (point)) (point) nil)
|
||||
(or (= beg (point-min)) (outline-flag-region (1- beg) beg nil))
|
||||
(or (bobp) (outline-flag-region (1- (point)) (point) nil))
|
||||
(let ((bbb (point)))
|
||||
(insert-before-markers txt)
|
||||
(org-reinstall-markers-in-region bbb)
|
||||
|
|
Loading…
Reference in New Issue