Skip to content

Commit

Permalink
Do NOT collapse prior to reveal
Browse files Browse the repository at this point in the history
Not like expand-tree, we must keep previous expand/collapse state of
children thus we cannot collapse prior to reveal.
  • Loading branch information
lambdalisue committed Aug 26, 2023
1 parent e75d45d commit 7b15c11
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions autoload/fern/internal/node.vim
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@ function! fern#internal#node#reveal(key, nodes, provider, comparator, token) abo
if node is# v:null || node.status is# s:STATUS_NONE
return s:Promise.resolve(a:nodes)
endif
return fern#internal#node#collapse(node, a:nodes, a:provider, a:comparator, a:token)
\.then({ ns -> s:expand_recursively(0, a:key, ns, a:provider, a:comparator, a:token) })
return s:expand_recursively(0, a:key, a:nodes, a:provider, a:comparator, a:token)
\.finally({ -> Profile() })
endfunction

Expand Down

0 comments on commit 7b15c11

Please sign in to comment.