-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add action to open a subtree recursively (v2) #483
Conversation
fe30976
to
c557fca
Compare
Edit:This is actually a defect on main. I'll open an issue :-) OriginalGood first revision! Recursive tree expansion works as I'd expect, very nice :-) I found a small quirk though. I have some configuration that toggles expansion of a node or opens a leaf. This has stopped working correctly with this revision. nmap <buffer> <CR> <Plug>(fern-action-toggle-expand-open)
nmap <buffer><expr> <Plug>(fern-action-toggle-expand-open)
\ fern#smart#leaf(
\ "<Plug>(fern-action-open:select)",
\ "<Plug>(fern-action-expand)",
\ "<Plug>(fern-action-collapse)") When I open Fern and expand a tree for the first time (with Here's a screen capture to demonstrate this behaviour. Notice the state of |
doc/fern.txt
Outdated
> | ||
nmap <buffer> | ||
\ <Plug>(fern-action-expand-tree) | ||
\ <Plug>(fern-action-expand-tree:stay) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are missing the closing quote block character here (<
).
\.then({ ns -> self.update_nodes(ns) }) | ||
\.finally({ -> Profile() }) | ||
endfunction | ||
let s:async.expand_tree = funcref('s:async_expand_tree') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something that we should document in fern-develop.txt
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should. The other async functions are part of the dev documentation IIRC
@lambdalisue @LunarWatcher does it make sense to close one of the PRs we have open? Who wants to own the changes for this feature? Edit: other PR closed 👍 |
get_child_nodes seems to interfere with the expansion status of the next level of directories
…ng the recursive expansion
The function recursively dig into children to return descendant nodes of the specified node.
c557fca
to
06f081e
Compare
@brandon1024 @LunarWatcher fixed and force pushed. Could you try and check? |
LGTM |
Original PR is #480
I rewrote
fern#internal#node#expand_tree
because of #482