Browse Source

Fix org-fold--hide-drawers--overlays

Ihor Radchenko 3 years ago
parent
commit
3fba34900e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org-fold.el

+ 1 - 1
lisp/org-fold.el

@@ -714,7 +714,7 @@ Return a non-nil value when toggling is successful."
   "Hide all drawers between BEGIN and END."
   (save-excursion
     (goto-char begin)
-    (while (re-search-forward org-drawer-regexp end t)
+    (while (and (< (point) end) (re-search-forward org-drawer-regexp end t))
       (let* ((pair (get-char-property-and-overlay (line-beginning-position)
                                                   'invisible))
              (o (cdr-safe pair)))