branch: externals/boxy
commit 0509c51105d5af209248f6a9e81f85665675aef1
Author: Amy Grinn <grinn....@gmail.com>
Commit: Amy Grinn <grinn....@gmail.com>

    Collapse grandchildren when grandparent collapsed.
    
    Boxy will sometimes add an errant marker that should not be able to be
    navigated to in the boxy diagram. By hiding children recursively this
    issue is resolved.
---
 boxy.el | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/boxy.el b/boxy.el
index feb8900cfd..936c3ac6eb 100644
--- a/boxy.el
+++ b/boxy.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2021 Free Software Foundation, Inc.
 
 ;; Author: Tyler Grinn <tylergr...@gmail.com>
-;; Version: 1.0.4
+;; Version: 1.0.5
 ;; File: boxy.el
 ;; Package-Requires: ((emacs "26.1"))
 ;; Keywords: tools
@@ -1255,7 +1255,15 @@ BOX is the box the button is being made for."
   "Cycle visibility of children of BOX."
   (with-slots (children hidden-children) box
     (if (or children hidden-children)
-        (cl-rotatef children hidden-children)
+        (progn
+          (cl-rotatef children hidden-children)
+          (when hidden-children
+            (mapc
+             (lambda (child)
+               (with-slots ((grandchildren children)) child
+                 (if grandchildren
+                     (boxy--cycle-children child))))
+             hidden-children)))
       (boxy--expand-box box))))
 
 (defun boxy--update-visibility (box)

Reply via email to