From 0c349a85f4ece797922fe9dccc79aef8c81ad27c Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 18 Apr 2021 12:05:27 -0700 Subject: [PATCH] Remove stale (unused) code in Windows finish. --- console_win.go | 28 ---------------------------- 1 file changed, 28 deletions(-) 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