Skip to content

Commit

Permalink
Remove stale (unused) code in Windows finish.
Browse files Browse the repository at this point in the history
  • Loading branch information
gdamore committed Apr 18, 2021
1 parent fb06997 commit 0c349a8
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions console_win.go
Expand Up @@ -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
Expand Down

0 comments on commit 0c349a8

Please sign in to comment.