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: run :edit command with nvim_cmd to escape special characters #2056
Conversation
Wondering whether somebody knows less verbose way to spell
in Rust. I only found Neovim::cmd which removes one nesting level. |
Note about
and
and it looks like |
I think it would be less verbose to use You could also use |
@fredizzimo
works and is certainly shorter, but I do not like extra roundtrips. Also There is one additional thing though: while determining what is wrong with faulty variants of the above expression I found out that expressions executed like this do not show errors, neither directly from them, nor from my autocommand which automatically switches to the directory of the entered file (and fails due to the deficiency of Note that errors do not show in log either. Not that I consider having them only in a log a good thing, in my opinion it makes sense to display errors in main UI. |
This will add a bit more lua #2062. I think the absolutely cleanest solution would be to add a new function there that can be called through RPC from neovide. For the error handling: |
I think it makes sense to merge this as-is, then (not) change how errors are dealt with later and basically for everything in ui_commands: I just realised that errors for almost every command there can appear and are silenced: it is rather common to have autocommands triggering at commands like Also, possibly not with function in lua, but with replacement for |
Looks like we don't even support drag-and-drop on Wayland atm, but tested through Xwayland and it works perfectly fine, thanks! I'll take care of making the callback a bit more readable with ad-hoc placed closures, then I'd merge this. |
Turns out that wasn't even necessary, Thank you! Chooooooooooo chooooooooooooo 🚂 |
I tested this commit by dragging and dropping file named
W:\tmp\neovide\(abc)\example#abc%def.txt
and it was opened successfully.Fixes #1983
What kind of change does this PR introduce?
Did this PR introduce a breaking change?
A breaking change includes anything that breaks backwards compatibility either at compile or run time.