Remove stale (unused) code in Windows finish.

This commit is contained in:
Garrett D'Amore 2021-04-18 12:05:27 -07:00
parent fb06997fe2
commit 0c349a85f4
1 changed files with 0 additions and 28 deletions

View File

@ -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