Skip to content

Commit d53500d

Browse files
committed
fix: tree toggling
1 parent 48c2b9f commit d53500d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

idee-treemacs.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
("S" idee/treemacs-switch-to-project-workspace)
159159
("E" treemacs-edit-workspaces)
160160
("F" treemacs-finish-edit)
161-
("t" treemacs (if (eq (treemacs-current-visibility) 'visible) "[*]" "[ ]") :exit nil)
161+
("t" idee/toggle-tree (if (eq (treemacs-current-visibility) 'visible) "[*]" "[ ]") :exit nil)
162162
("h" treemacs-toggle-show-dotfiles (if treemacs-show-hidden-files "[*]" "[ ]") :exit nil)
163163
("c" idee/treemacs-collapse-dir-toggle :exit nil)
164164
("g" magit-status)

idee-views.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,12 @@ VISITED is an optional list with windows already visited."
196196
(defun idee/toggle-tree ()
197197
"Toggle the tree."
198198
(interactive)
199-
(if (and idee/tree-enabled (not (eq 'visible (treemacs-current-visibility))))
199+
(if (not (eq 'visible (treemacs-current-visibility)))
200200
(progn
201-
(setq idee/tree-enabled nil)
201+
(setq idee/tree-enabled t)
202202
(treemacs))
203203
(progn
204-
(setq idee/tree-enabled t)
204+
(setq idee/tree-enabled nil)
205205
(treemacs))))
206206

207207
;;;###autoload

0 commit comments

Comments
 (0)