Skip to content

"Ghost cursor" artifact left behind after user types a line on Windows 10 #155

@shueybubbles

Description

@shueybubbles

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.

  • Operating System (eg. Windows, Linux, Mac)
    WINDOWS 10
  • Terminal Emulator (eg. xterm, gnome-terminal, konsole, ConEmu, Terminal.app, Command Prompt)
    Command Prompt
  • Bug behaviour
    Liner leaves behind a static cursor image on the first character of input
  • Expected behaviour
    No such distracting artifacts
  • Complete sample that reproduces the bug
package main

import (
	"fmt"

	"github.com/peterh/liner"
)

func main() {
	line := liner.NewLiner()
	defer line.Close()
	text := ""
	var err error
	for text != "q" {
		text, err = line.Prompt("Prompt:")
		if err == nil {
			fmt.Println("You typed:" + text)
		}
	}
}

image

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions