xilun / cbwin

Launch Windows programs from "Bash on Ubuntu on Windows" (WSL)
Other
327 stars 25 forks source link

wcmd cmd no longer laggy, but eats characters #28

Open fpqc opened 7 years ago

fpqc commented 7 years ago

Hi @xilun! I've got a screenshot for you: 2016-08-14

Ignore the funniness for a minute =O

Watch this:

2016-08-14 1

It must be a conhost bug of some kind eating characters when interfacing with cbwin.

xilun commented 7 years ago

I see. Actually I noticed that already but I don't know enough about ptys and conhost, and for now I still haven't had time to dig into it. In the conhost case, cmd is not redirected so it uses the Win32 console API. However, some characters also seem to be directed to WSL. There might be something standard to try on either side to improve the situation, but it's only a supposition -- well, I would even try something non-documented on this topic (if not too complicated), would I find one, if it gets the behavior fixed. In the other case, cmd is fully redirected, so it works like when you pipe its input and output. You get basic line edition (delete works, I think) thanks to the cooked input mode on the WSL side.