Odd Issues when trying to rerender a tree after focus regained event #1075
Replies: 2 comments 1 reply
-
I took some time to dig into the provided What makes this interesting is that if I don't go too deep in the nodes, I can redraw the tree with no issue. This is likely a red herring but its curious none the less. I will continue digging into this and see if I can discover what is actually happening in this process. Also if this should be an issue vs a discussion, please let me know and I can convert this :) |
Beta Was this translation helpful? Give feedback.
-
Thanks discussion board for being a great rubber ducky! Turns out I just write bad code 🙃 Deep in the bowels of my serialization code, I was apparently secretly duplicating children. |
Beta Was this translation helpful? Give feedback.
-
The title isn't super clear here so to better explain what I am doing, here is a series of commands I am running
:Neotree remote :q :Neotree remote
This series of events throws the following error
And for completeness, the snippet of code causing this within my repo is
The
remote
source is Netman, though its not terribly important here. I have faced this issue several times in the past and never really gotten past it. I discussed with @cseickel a bit in relation to this (see #887 for background details).I am finally getting back around to addressing this, but I don't really know how. When I talked before on #887, I was advised that I need to just recreate the tree each time. Which is fine, I have a way to serialize down my tree. However I can't just recreate my tree as attempting to execute a
render.show_nodes
with the previous tree throws this fun errorIt seems as though the tree still has the previous nodes in it. And I can't remove said nodes as the window that
nui
thought it had associated with the tree doesn't exist anymore (which is where the above error is coming from).So I suppose my question is, how are we supposed to do this?
It's a bit tough for me to provide a repoducible configuration outside of my setup as it is directly related to how I am trying to use Neo-tree. I don't actually know if this is a bug or if I am just doing something wrong.
For clarity, I have pushed up the bugged code to a branch on netman. The specific navigate code is here, though I think this is really down to a "how am I expected to do X" vs "where is the bug in my code" thing.
Beta Was this translation helpful? Give feedback.
All reactions