-
-
Notifications
You must be signed in to change notification settings - Fork 629
fix(explorer): reload executable
stat
#1427
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this, i've noticed it many times and it was bothering me too
lua/nvim-tree/explorer/reload.lua
Outdated
end | ||
local n = nodes_by_path[abs] | ||
n.executable = builders.is_executable(abs, n.extension) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check if n exists first please to make sure that this won't crash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did. But I removed it before I created PR because I thought line 49 already covered the case.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed but it still might not go into the conditionals, so make the check again :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, done
lua/nvim-tree/explorer/reload.lua
Outdated
@@ -62,7 +62,10 @@ function M.reload(node, status) | |||
table.insert(node.nodes, link) | |||
end | |||
end | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty line to remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested OK after refreshing. Consistent with other operations e.g. rename.
Will work automatically after #1431
The
NvimTreeRefresh
command didn't refreshexecutable
field of thenode
.Step to reproduce:
nvim-tree
by:NvimTreeOpen
chmod
command:NvimTreeRefresh