MCPcopy Create free account
hub / github.com/atomicgo/cursor / Hide

Method Hide

cursor_windows.go:79–87  ·  view source on GitHub ↗

Hide the cursor. Don't forget to show the cursor at least at the end of your application with Show. Otherwise the user might have a terminal with a permanently hidden cursor, until he reopens the terminal.

()

Source from the content-addressed store, hash-verified

77// Don't forget to show the cursor at least at the end of your application with Show.
78// Otherwise the user might have a terminal with a permanently hidden cursor, until he reopens the terminal.
79func (c *Cursor) Hide() {
80 handle := syscall.Handle(c.writer.Fd())
81
82 var cci consoleCursorInfo
83 _, _, _ = procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&cci)))
84 cci.visible = 0
85
86 _, _, _ = procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&cci)))
87}
88
89// ClearLine clears the current line and moves the cursor to its start position.
90func (c *Cursor) ClearLine() {

Callers

nothing calls this directly

Calls 1

FdMethod · 0.80

Tested by

no test coverage detected