Skip to content

Commit

Permalink
windows: restore cursor location correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
gdamore committed Mar 3, 2024
1 parent b02dac3 commit d1364d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions console_win.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit d1364d5

Please sign in to comment.