org-activate-folds: Skip over folded newlines faster
* lisp/org.el (org-activate-folds): When searching next unfolded newline skip over folded newlines faster, using org-fold-core API.
This commit is contained in:
parent
b6f8078ab4
commit
c9b655f273
|
@ -5812,6 +5812,7 @@ highlighting was done, nil otherwise."
|
||||||
"Arrange trailing newlines after folds to inherit face before the fold."
|
"Arrange trailing newlines after folds to inherit face before the fold."
|
||||||
(let ((next-unfolded-newline (search-forward "\n" limit 'move)))
|
(let ((next-unfolded-newline (search-forward "\n" limit 'move)))
|
||||||
(while (and next-unfolded-newline (org-fold-folded-p) (not (eobp)))
|
(while (and next-unfolded-newline (org-fold-folded-p) (not (eobp)))
|
||||||
|
(goto-char (org-fold-core-next-visibility-change nil limit))
|
||||||
(setq next-unfolded-newline (search-forward "\n" limit 'move)))
|
(setq next-unfolded-newline (search-forward "\n" limit 'move)))
|
||||||
(when next-unfolded-newline
|
(when next-unfolded-newline
|
||||||
(org-with-wide-buffer
|
(org-with-wide-buffer
|
||||||
|
|
Loading…
Reference in New Issue