-
Notifications
You must be signed in to change notification settings - Fork 51
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
Not working under WSL2 (tcgetpgrp failed: Not a tty) #47
Comments
Can confirm this is an issue. Occurs in both alacritty and normal windows terminal. With the health patch, and modifying the powershell command, I'm able to get But the |
I just modified the powershell command in the utils file to the following, which is simpler and avoids as many special characters. cmd_check = 'powershell.exe "(Get-Clipboard -Format Image)"'
cmd_paste = 'powershell.exe "(Get-Clipboard -Format Image).save(' .. "'%s'" .. ')"' |
I did troubleshoot this to at least narrowing it down to being able to run this to reproduce this issue with neovim wigging out after
And after this single command is run, neovim no longer refreshes properly. I'm guessing something to do with the |
That might actually be a neovim bug. os.executue('powershell.exe /?'), causes the same issue... Weird. |
So may be two bugs.
|
Did some more testing. I disabled this plugin, and was able to reproduce some issues. So likely some neovim issues to resolve lol. These fixes definitely fixed the paste not working: cmd_check = 'powershell.exe "(Get-Clipboard -Format Image)"' But when we use the "os.execute" within WSL right now, it causes some issues with Neovim not refreshing. And using Edit: was able to use io.pipe instead of os.execute to get rid of the tcgetgrp error. Only have to figure out why neovim wiggs out now... lol Edit2: Nvim inside tmux seems to do MUCH better at not getting bugged screen refreshing.... So tmux + io.pipe + fixed powershell command + fixed help = fully working markdown paste image. Alternative would have been just sending the above powershell command directly to a terminal... wouldn't have been that hard. |
I fixed powershell command and create PR. #44 |
Issue 47 - ekickx#47 cmd_chedk and cmd_past modified. cmd_check = 'powershell.exe "(Get-Clipboard -Format Image)"' cmd_paste = 'powershell.exe "(Get-Clipboard -Format Image).save(' .. "'%s'" .. ')"' NOTE: WSL2 displays 'tcgetpgrp failed: Not a tty'. vim.cmd("mode") added to M.insert_text function to redraw screen removes the text. The error text is not written to current buffer.
Hi, there!
I just found this plugin and installed it via lazy.nvim
When I tried this plugin under the Powershell environment, everything works well, however when I entered the
:PasteImage
command under the WSL environment, following error occured (I got no idea on why the error output is not selectable so I have to take screenshot. There are also some character displaying issue might due to my system language):I have also checked this issue #34, but it seems like not related.
Thanks for your help!
The text was updated successfully, but these errors were encountered: