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.
This commit is contained in:
Bastien Guerry 2013-04-12 17:52:24 +02:00
parent 57fa03b2da
commit 9a1511de6b
1 changed files with 2 additions and 2 deletions

View File

@ -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))