Browse Source

org.el (org-forward-heading-same-level): Fix bug

* org.el (org-forward-heading-same-level): Fix bug when
forwarding to a hidden subtree of the same level.

Thanks to Bernt Hansen for reporting this bug.
Bastien Guerry 12 năm trước cách đây
mục cha
commit
9a1511de6b
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      lisp/org.el

+ 2 - 2
lisp/org.el

@@ -23013,8 +23013,8 @@ non-nil it will also look at invisible ones."
                're-search-forward))
           (count (if arg (abs arg) 1))
           (result (point)))
-      (forward-char (if (and arg (< arg 0)) -1 1))
-      (while (and (> count 0)
+      (while (and (prog1 (> count 0)
+		    (forward-char (if (and arg (< arg 0)) -1 1)))
                   (funcall f org-outline-regexp-bol nil 'move))
         (let ((l (- (match-end 0) (match-beginning 0) 1)))
           (cond ((< l level) (setq count 0))