emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 2a3c8f3 3/3: Fix outline-cycle-buffer issue in `C-h b' buffers


From: Lars Ingebrigtsen
Subject: master 2a3c8f3 3/3: Fix outline-cycle-buffer issue in `C-h b' buffers
Date: Mon, 15 Nov 2021 01:38:29 -0500 (EST)

branch: master
commit 2a3c8f3d2e8a9b58c8b6c93168096ed096bcc5d6
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix outline-cycle-buffer issue in `C-h b' buffers
    
    * lisp/outline.el (outline--fix-up-all-buttons): Fix issue when
    called after collapsing a buffer (bug#51855).
---
 lisp/outline.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/outline.el b/lisp/outline.el
index cefb811..9a2e432 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -1014,7 +1014,10 @@ If non-nil, EVENT should be a mouse event."
   (when outline-minor-mode-use-buttons
     (outline-map-region
      (lambda ()
-       (if (eq (outline--cycle-state) 'show-all)
+       ;; `outline--cycle-state' will fail if we're in a totally
+       ;; collapsed buffer -- but in that case, we're not in a
+       ;; `show-all' situation.
+       (if (eq (ignore-errors (outline--cycle-state)) 'show-all)
            (outline--insert-open-button)
          (outline--insert-close-button)))
      (or from (point-min)) (or to (point-max)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]