浏览代码

org-inlinetask.el: Fix visibility cycling for inlinetasks

* lisp/org-inlinetask.el (org-inlinetask-hide-tasks): Make sure that
we loop over inlinetasks inside current section only.
`org-inlinetask-goto-end' moves point to the end of the inlinetask
element.  If an inlinetask is followed by a heading, the function
logic will treat the heading as the beginning of another inline task.
Prevent it by moving the point at the end of the END line of the
inlinetask.

Fixes
https://list.orgmode.org/orgmode/CAP7OBx+rs-7v4jstEFYC4u0=0NZ3xJKfb3CNrWeDvjmwRTvgxw@mail.gmail.com/
Ihor Radchenko 3 年之前
父节点
当前提交
5f184b5f23
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lisp/org-inlinetask.el

+ 2 - 1
lisp/org-inlinetask.el

@@ -358,7 +358,8 @@ This function is meant to be used in `org-cycle-hook'."
 	   (or (org-inlinetask-at-task-p)
 	       (and (outline-next-heading) (org-inlinetask-at-task-p)))
 	 (org-inlinetask-toggle-visibility)
-	 (org-inlinetask-goto-end))))))
+	 (org-inlinetask-goto-end)
+         (backward-char))))))
 
 (defun org-inlinetask-remove-END-maybe ()
   "Remove an END line when present."