Skip to content

Commit

Permalink
Calling clear panics if the cursor position is outside the resized wi…
Browse files Browse the repository at this point in the history
…ndow

Hide the cursor before calling Clear()

See nsf/termbox-go#125
  • Loading branch information
Alkorin committed Feb 11, 2019
1 parent c055c87 commit 72ea818
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gui.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ func (g *Gui) handleEvent(ev *termbox.Event) error {

// flush updates the gui, re-drawing frames and buffers.
func (g *Gui) flush() error {
termbox.HideCursor()
termbox.Clear(termbox.Attribute(g.FgColor), termbox.Attribute(g.BgColor))

maxX, maxY := termbox.Size()
Expand Down

0 comments on commit 72ea818

Please sign in to comment.