Keep cursor at highlighted file/directory when clearing filter
stickperson opened this issue · comments
Joe Meissler commented
Is this a question?
No
Can this functionality be implemented utilising API?
Possibly. api.tree.get_node_under_cursor
can get the node but there does not appear to be a method to navigate back to it.
Is your feature request related to a problem? Please describe.
When clearing a filter, it's desirable to keep the node on the current folder/file as opposed to the line.
Describe the solution you'd like
See above
Describe alternatives you've considered
N/A
Additional context
nvim-tree.renderer.draw()
is called when clearing the filter. This is where the cursor position is set.
Screen.Recording.2023-02-15.at.7.54.12.AM.mov
Alexander Courtis commented
Duplicate of #1785