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

Method Show

cursor_windows.go:66–74  ·  view source on GitHub ↗

Show the cursor if it was hidden previously. Don't forget to show the cursor at least at the end of your application. 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

64// Don't forget to show the cursor at least at the end of your application.
65// Otherwise the user might have a terminal with a permanently hidden cursor, until he reopens the terminal.
66func (c *Cursor) Show() {
67 handle := syscall.Handle(c.writer.Fd())
68
69 var cci consoleCursorInfo
70 _, _, _ = procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&cci)))
71 cci.visible = 1
72
73 _, _, _ = procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&cci)))
74}
75
76// Hide the cursor.
77// Don't forget to show the cursor at least at the end of your application with Show.

Callers

nothing calls this directly

Calls 1

FdMethod · 0.80

Tested by

no test coverage detected