Closed miversen33 closed 1 year ago
The problem is that tree:get_node()
works by getting the cursor position of the window that NuiTree was rendered into. At this moment, that window no longer exists. You need to gaurd against that with code like this:
local window_exists = renderer.window_exists(state)
if window_exists then
local node = state.tree and state.tree:get_node()
if node then
-- now you can work with the focused node if it exists...
That did it :) You're the best, thanks!
I'm not quite sure what I am doing wrong but Netman's Neotree Source cannot be reopened after its closed.
Code can be found here
The close event works perfectly (either by pressing
q
and triggering Neotree'sclose_window
command) or by running:q
However, when reopening the source (for Netman, that is:Neotree remote
), you are presented with the following errorThe line in question in netman is
I'm not really sure what I am doing wrong, I assume I just missed something. Got any guidance for me?