diff --git a/console_win.go b/console_win.go index e32bed4..d1341cf 100644 --- a/console_win.go +++ b/console_win.go @@ -265,34 +265,6 @@ func (s *cScreen) Fini() { s.disengage() } -func (s *cScreen) finish() { - s.Lock() - s.style = StyleDefault - s.curx = -1 - s.cury = -1 - s.fini = true - s.vten = false - s.Unlock() - - s.setCursorInfo(&s.ocursor) - s.setInMode(s.oimode) - s.setOutMode(s.oomode) - s.setBufferSize(int(s.oscreen.size.x), int(s.oscreen.size.y)) - s.clearScreen(StyleDefault, false) - s.setCursorPos(0, 0, false) - procSetConsoleTextAttribute.Call( - uintptr(s.out), - uintptr(s.mapStyle(StyleDefault))) - - close(s.quit) - procSetEvent.Call(uintptr(s.cancelflag)) - // Block until scanInput returns; this prevents a race condition on Win 8+ - // which causes syscall.Close to block until another keypress is read. - <-s.scandone - syscall.Close(s.in) - syscall.Close(s.out) -} - func (s *cScreen) disengage() { s.Lock() stopQ := s.stopQ