Fix heading insertion with C-RET when inline tasks are involved

* lisp/org.el (org-insert-heading): Skip inline tasks when trying to
insert a new heading after the end of the subtree.
This commit is contained in:
Carsten Dominik 2010-10-14 11:03:47 +02:00
parent d44f065c08
commit 19d695ef8f
1 changed files with 6 additions and 0 deletions

View File

@ -6748,6 +6748,12 @@ This is important for non-interactive uses of the command."
(cond
(org-insert-heading-respect-content
(org-end-of-subtree nil t)
(when (featurep 'org-inlinetask)
(while (and (not (eobp))
(looking-at "\\(\\*+\\)[ \t]+")
(>= (length (match-string 1))
org-inlinetask-min-level))
(org-end-of-subtree nil t)))
(or (bolp) (newline))
(or (org-previous-line-empty-p)
(and blank (newline)))