Thanks for writing this plugin! Unfortunately, I am connecting to a Windows machine via SSH and the osc52.copy function will fail every time because vim.fn.filewritable does not return a boolean but instead returns 0. In lua, only nil and false are actually false
That said, I can say the else block does work correctly if a small patch is applied:
if vim.fn.filewritable('/dev/fd/2') ~= 0 then
I've applied this and some more experimental stuff (like using the builtin function vim.notify for errors/status messages) so I couldn't just open a PR directly to fix this, as I've hacked this plugin up quiet a bit on my end 😅
Hello!
Thanks for writing this plugin! Unfortunately, I am connecting to a Windows machine via SSH and the
osc52.copy
function will fail every time becausevim.fn.filewritable
does not return a boolean but instead returns0
. In lua, onlynil
andfalse
are actuallyfalse
That said, I can say the
else
block does work correctly if a small patch is applied:I've applied this and some more experimental stuff (like using the builtin function
vim.notify
for errors/status messages) so I couldn't just open a PR directly to fix this, as I've hacked this plugin up quiet a bit on my end 😅