From d1364d5937eed5d5ac03b4fec309beb6db26f3eb Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 3 Mar 2024 15:19:20 -0800 Subject: [PATCH] windows: restore cursor location correctly --- console_win.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/console_win.go b/console_win.go index 92ae4e5..e265250 100644 --- a/console_win.go +++ b/console_win.go @@ -341,12 +341,12 @@ func (s *cScreen) disengage() { } } else if !s.disableAlt { s.clearScreen(StyleDefault, s.vten) + s.setCursorPos(0, 0, false) } + s.setCursorInfo(&s.ocursor) + s.setBufferSize(int(s.oscreen.size.x), int(s.oscreen.size.y)) s.setInMode(s.oimode) s.setOutMode(s.oomode) - s.setBufferSize(int(s.oscreen.size.x), int(s.oscreen.size.y)) - s.setCursorPos(0, 0, false) - s.setCursorInfo(&s.ocursor) _, _, _ = procSetConsoleTextAttribute.Call( uintptr(s.out), uintptr(s.mapStyle(StyleDefault)))