Skip to content

Commit

Permalink
Merge pull request #1 from noborus/end-processing
Browse files Browse the repository at this point in the history
Call tcell's Fini() on exit
  • Loading branch information
aca authored Apr 29, 2020
2 parents 04f562d + 573d5b2 commit c98d43f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tdraw.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ func main() {
fmt.Fprintf(os.Stderr, "%v\n", e)
os.Exit(1)
}
defer s.Fini()
defStyle = tcell.StyleDefault
s.SetStyle(defStyle)

Expand All @@ -193,6 +194,7 @@ func main() {
imodeStartX, _ := 0, 0
// imodeLastC := ' '

loop:
for {
// r, _, _, _ := s.GetContent(mx, my)
emitStr(s, 1, 1, defStyle, fmt.Sprintf("[%3v,%3v] %-7s | esc:box / t:text / l:line / e:erase / MouseR: eraser", mx, my, mode))
Expand Down Expand Up @@ -253,7 +255,7 @@ func main() {
for y := 0; y < len(arr); y++ {
fmt.Println(arr[y])
}
os.Exit(0)
break loop
}

switch mode {
Expand Down

0 comments on commit c98d43f

Please sign in to comment.