Skip to content
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

NERDTreeFind closes all currently expanded nodes in the tree view. #793

Closed
joel1st opened this issue Jan 2, 2018 · 2 comments · Fixed by #794
Closed

NERDTreeFind closes all currently expanded nodes in the tree view. #793

joel1st opened this issue Jan 2, 2018 · 2 comments · Fixed by #794
Assignees
Labels

Comments

@joel1st
Copy link

joel1st commented Jan 2, 2018

This appears to have been introduced by the recent NERDTreeFind refactors/bug fixes.

When calling NERDTreeFind on a particular buffer, the current state of expanded nodes in the tree are lost and only the current buffer is expanded. This can be jarring and disrupt certain workflows.

To recreate the issue:
Expand a few sibling folders of where the buffer that you want to call NERDTreeFind on is located.
Call NERDTreeFind on said buffer.
Observe that the buffer's folder has been correctly expanded, but the sibling folders have been closed.

@joel1st joel1st changed the title NERDTreeFind closes all expanded nodes in the tree view. NERDTreeFind closes all currently expanded nodes in the tree view. Jan 2, 2018
@lifecrisis
Copy link
Contributor

I noticed this myself after using the fix I created for another bug. I was just waiting to see if anyone complained before dealing with it. I admit that it was inadvertently introduced.

Ideally, we would fix both problems... Worst case, we can just revert the changes (:NERDTreeFind has another problem that is fixed with a PR that is waiting review). Going back to the previous functionality wouldn't be hard. The fix that introduced this was debatable anyway...

@PhilRunninger, some good changes were made in PR #785. We don't need to lose all of them, but it would be easier to revert the main change from that PR. What do you think?

@lifecrisis lifecrisis added the bug label Jan 2, 2018
@lifecrisis lifecrisis self-assigned this Jan 2, 2018
lifecrisis pushed a commit to lifecrisis/nerdtree that referenced this issue Jan 5, 2018
The small change here reverts an attempted bugfix from pull request
children of the root whenever ":NERDTreeFind" was invoked.  This was
disruptive (as reported in preservim#793), so a new method must be found to
solve the problem of ":NERDTreeFind" not opening newly created
files.

Fixes preservim#793.
lifecrisis pushed a commit to lifecrisis/nerdtree that referenced this issue Jan 5, 2018
The small change here reverts an attempted bugfix from pull request
of the root whenever ":NERDTreeFind" was invoked.  This was
disruptive (as reported in preservim#793), so a new method must be found to
solve the problem of ":NERDTreeFind" not opening newly created
files.

Fixes preservim#793.
lifecrisis pushed a commit to lifecrisis/nerdtree that referenced this issue Jan 5, 2018
The small change here reverts an attempted bugfix from pull request
number 785.  That change resulted in the unintended side-effect of
closing other children of the root the root whenever ":NERDTreeFind"
was invoked.  This was disruptive (as reported in preservim#793), so a new
method must be found to solve the problem of ":NERDTreeFind" not
opening newly created files.

Fixes preservim#793.
lifecrisis pushed a commit to lifecrisis/nerdtree that referenced this issue Jan 5, 2018
The small change here reverts an attempted bugfix from preservim#785.  That
change resulted in the unintended side-effect of closing other
children of the root whenever ":NERDTreeFind" was invoked.  This was
disruptive (as reported in preservim#793), so a new method must be found to
solve the problem of ":NERDTreeFind" not opening newly created
files.

Fixes preservim#793.
@lifecrisis
Copy link
Contributor

@joel1st, try updating the NERDTree and see if your problem is fixed. I believe this will do it for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants