-
Notifications
You must be signed in to change notification settings - Fork 132
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
"Ghost cursor" artifact left behind after user types a line on Windows 10 #155
Comments
Liner doesn't draw the cursor, it is up to the Windows Console (or terminal emulator on other platforms) to draw the cursor. I use a program built with Liner on Windows every day. I don't recall seeing that particular issue in the past few years, but I switched from "Command Prompt" (aka "Windows Console") to "Windows Terminal" as soon as it became available. (You can get Windows Terminal from the Windows Store, and I believe Windows Terminal is the default on Windows 11), and my Windows Terminal configuration uses a block cursor instead of the underline cursor shown in your screenshot. |
@peterh I have another report of my app causing the bash window on a Mac to behave oddly after the app exits. Might you have a few minutes to look at our use of liner to make sure we're not using it in some obviously incorrect manner? Our wrapper class for it is at https://github.com/microsoft/go-sqlcmd/blob/e3972914801bc3492b49b6fe642a7e931e088be3/pkg/console/console.go#L24 There are probably several other go packages I could replace it with for reading lines but picking from the vast set to land on one that meets all our needs can take a while, so I'm hoping I can get liner to work. |
Would forgetting to call |
Yes. You must call |
I'm evaluating line input modules to use for my Golang version of sqlcmd (github.com/microsoft/go-sqlcmd)
So far
liner
looks like a good candidate except for this display glitch. I can't tell if it's a Windows problem or an issue with the module. When my process exits the ghost cursor images disappear.WINDOWS 10
Command Prompt
Liner leaves behind a static cursor image on the first character of input
No such distracting artifacts
The text was updated successfully, but these errors were encountered: