Преглед на файлове

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 години
родител
ревизия
9a1511de6b
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  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))