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

fix(renderer): after focusing a node, such node was always focused #1280

Merged

Conversation

georgeguimaraes
Copy link
Contributor

Sorry for the bug. This should fix it.

Do you prefer to have the code without the comment?

Fixes #1279

Copy link
Contributor

@cseickel cseickel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix. No need to remove the comment, you can never have too many comments.

@cseickel cseickel merged commit f8aed96 into nvim-neo-tree:main Dec 31, 2023
2 of 3 checks passed
@cseickel
Copy link
Contributor

Darn. I got so used to bypassing one flaky test that I let this through without noticing that it broke more tests. I'm removing that flaky test now and I'll take a look at the newly broken tests:

:Neotree show toggle should retain the focused node on next show
:Neotree focus toggle should retain the focused node on next focus

@georgeguimaraes
Copy link
Contributor Author

I'll take a look too.

@georgeguimaraes
Copy link
Contributor Author

Yeah, when we call manager.close, I'm not saving the position in this new way. So the cursor is always at the first line.
I'm experimenting adding renderer.position.save on some other points of code, but still no success yet. I'm still trying though, just wanted to give a heads up.

@georgeguimaraes
Copy link
Contributor Author

georgeguimaraes commented Jan 3, 2024

PR with fix available at #1288. Tests passing!

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

Successfully merging this pull request may close these issues.

BUG: previously revealed file incorrectly focused on all future renders
2 participants