nsf / termbox-go

Pure Go termbox implementation
http://godoc.org/github.com/nsf/termbox-go
MIT License
4.67k stars 373 forks source link

Fix two bugs in Windows console handling #201

Closed ipankajg closed 5 years ago

ipankajg commented 5 years ago

This PR fixes two bugs:

  1. Earlier code was not clearing the screen fully and the fix for that is in first commit.
  2. The other issue is more intricate, it was causing termbox to paint content in invisible portion of console. This issue only happens when you launch termbox application when existing console buffer is scrolled down. See attached screenshot (#1) and (#2). With the fix, the problem goes away and console is painted correctly as we fix the window position by calling SetConsoleWindowInfo.

image

image

ipankajg commented 5 years ago

Thanks for merging these fixes.