浏览代码

Do not move point when cycling subtree visibility

* lisp/org.el (org-cycle-hide-property-drawers): Fix a bug introduced
in 1027e0256903bc2c4ef9edfb1f7279294fa3f195.
Nicolas Goaziou 5 年之前
父节点
当前提交
3435b05922
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -6140,7 +6140,7 @@ STATE should be one of the symbols listed in the docstring of
 	   (beg (if global? (point-min) (line-beginning-position)))
 	   (end (cond (global? (point-max))
 		      ((eq state 'children) (org-entry-end-position))
-		      (t (org-end-of-subtree t)))))
+		      (t (save-excursion (org-end-of-subtree t))))))
       (org-with-point-at beg
 	(while (re-search-forward org-property-start-re (max end (point)) t)
 	  (let ((start (match-end 0)))