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(render): add a condition to check bufname already exists or not #1429

Closed
wants to merge 2 commits into from

Conversation

tribhuwan-kumar
Copy link

@tribhuwan-kumar tribhuwan-kumar commented Apr 9, 2024

added a condition to check if the bufname is already exists or not before setting bufname
fix #1415
fix #1365

break
end
end
if not bufnameExists then
Copy link
Contributor

@cseickel cseickel Apr 9, 2024

Choose a reason for hiding this comment

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

You can't just not give the buffer a name. The name is important. This will fix one bug while creating new ones.

I've been meaning to circle back on this myself but haven't found the time. See these for history f you want to spend the time:

#1418
#1408
#1406
#1390

Copy link
Author

Choose a reason for hiding this comment

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

Now I'm just reusing the already existed buffer name, that will fix this error:
[Neo-tree ERROR] debounce filesystem_navigate error: ...e-bug/plugins/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:1036: Vim:E95: Buffer with this name already exists
Since I'm using my own fork with these changes, I'm not getting any unexpected error or behavior. I checked almost features of Neotree in Arch Linux. I think everything is fine!

@cseickel
Copy link
Contributor

With this change the bufname of the neo-tree buffer is unset. While that fixes your specific bug, it will just create others down the line because the name is actually important. Thanks for trying, but this is not a valid solution to this problem.

@cseickel cseickel closed this Apr 11, 2024
@cseickel
Copy link
Contributor

This will be fixed by #1433

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