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.
()
| 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. |
| 66 | func (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. |