Skip to content

fix(filesystem): follow_current_file logic error#2053

Merged
pynappo merged 1 commit into
nvim-neo-tree:mainfrom
julianbuettner:main
Jun 27, 2026
Merged

fix(filesystem): follow_current_file logic error#2053
pynappo merged 1 commit into
nvim-neo-tree:mainfrom
julianbuettner:main

Conversation

@julianbuettner

Copy link
Copy Markdown
Contributor

Neotree did not follow_current_file in my neovim setup anymore, same thing happening to a colleague using Neotree.

I let a LLM investigate and apparently the bug is that "not" is stronger binding than comparison, so the line

not winpos == "current"
--equals
(not winpos) == "current"
-- equals
false == "current"

The suggested fix solved the problem for me.

@pynappo pynappo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

i'll merge b/c obviously the logic i wrote there was wrong, but for future reference can you write the reproduction steps needed to reproduce the issue? would be nice to have a test case to cover any future regressions

@pynappo pynappo changed the title fix: neotree follow current file fix: follow_current_file logic error Jun 27, 2026
@pynappo pynappo changed the title fix: follow_current_file logic error fix(filesystem): follow_current_file logic error Jun 27, 2026
@pynappo pynappo merged commit b01ee17 into nvim-neo-tree:main Jun 27, 2026
17 checks passed
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.

2 participants