-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
Focused_node and empty dir #417
Comments
|
Regarding logs, understood. I did the same thing, just thought it would be better to show the first line of each log entry and not the last one, if the view cannot present it fully.
otherwise, the same exception
Thank you :) |
Ah thanks for the detailed explanation. This is definitely an issue. After some research, I found Rust's However, I'm not sure why we get |
Let's play around a bit.
xplr.config.modes.builtin.default.key_bindings.on_key["#"] = {
help = "edit file",
messages = { { CallLua = "custom.edit_file" } },
}
xplr.fn.custom.edit_file = function(a)
print(null)
print(nil)
print(a.unknown_field)
print(a.focused_node)
io.read()
end
We get the following result: nil
nil
nil
userdata: NULL I get I wasn't able to find any definition of Anyway, I think for our use case, it makes sense to set |
As far as I understood the linked StackOverflow answer, from Lua's point of view, there is nothing special in |
See pub trait LuaSerdeExt<'lua> at https://github.com/khvzak/mlua/blob/f0f5a8a0af62aff8007b20d58ef8f92b9ba8bc5d/src/serde/mod.rs#L17 |
Yes, that's what I mentioned, there's no concept of |
Probably not. |
Ok fixed. I guessed right.
|
Same as
It used by default to get the same result when applying |
Got it. Thanks. |
Hi @sayanarijit.
It seems there are two separate issues that may be reproduced by the same way, but, perhaps, this is just something I don't understand.
Given the following init.lua and
xplr
0.16.4:If you go to an empty directory and press 'F4', the following happens:
/tmp/fn
is created with a stringfocused is NOT nil
, although as the directory is empty, I would say that thefocused_node
should benil
. Documentation, at least from my point of view, suggests this is wrong, describingfocused_node
asType: nullable Node
. And at the same time the secondos.execute
throws exception that may be seen in logssuggesting that it is actually not a table, but a userdata.
2. At the same time the above exception produces log string that is actually cannot be seen in logs using the above almost default configuration. I mean I see this:
Here, probably, the first line of the error should be seen
Thanks!
The text was updated successfully, but these errors were encountered: