git://git.iain.cx/iain
/
pstop.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1b47199
)
fmt screen.go
author
Simon J Mudd
<sjmudd@pobox.com>
Tue, 24 Feb 2015 08:51:24 +0000
(09:51 +0100)
committer
Simon J Mudd
<sjmudd@pobox.com>
Tue, 24 Feb 2015 08:51:24 +0000
(09:51 +0100)
screen/screen.go
patch
|
blob
|
history
diff --git
a/screen/screen.go
b/screen/screen.go
index
0478b46
..
41aa4aa
100644
(file)
--- a/
screen/screen.go
+++ b/
screen/screen.go
@@
-83,7
+83,7
@@
func (s *TermboxScreen) Initialise() {
s.fg = termbox.ColorDefault
s.bg = termbox.ColorDefault
s.fg = termbox.ColorDefault
s.bg = termbox.ColorDefault
- s.SetSize(
termbox.Size()
)
+ s.SetSize(
termbox.Size()
)
}
// print the characters but don't print them outside the screen
}
// print the characters but don't print them outside the screen
@@
-118,11
+118,11
@@
func (s *TermboxScreen) Size() (int, int) {
// create a channel for termbox.Events and run a poller to send
// these events to the channel. Return the channel.
func (s TermboxScreen) TermBoxChan() chan termbox.Event {
// create a channel for termbox.Events and run a poller to send
// these events to the channel. Return the channel.
func (s TermboxScreen) TermBoxChan() chan termbox.Event {
-
termboxChan := make(chan termbox.Event)
-
go func() {
-
for {
-
termboxChan <- termbox.PollEvent()
-
}
-
}()
-
return termboxChan
+ termboxChan := make(chan termbox.Event)
+ go func() {
+ for {
+ termboxChan <- termbox.PollEvent()
+ }
+ }()
+ return termboxChan
}
}