Add bracket surround

This commit is contained in:
Zachary Yedidia
2017-08-27 12:18:26 -04:00
parent 612658d9c4
commit 6f302826c8
3 changed files with 69 additions and 1 deletions

View File

@@ -59,6 +59,9 @@ var (
// Event channel
events chan tcell.Event
autosave chan bool
// Read events on another thread or wait for a temporary read
lockPollEvent bool
)
// LoadInput determines which files should be loaded into buffers
@@ -419,8 +422,9 @@ func main() {
// Here is the event loop which runs in a separate thread
go func() {
for {
if screen != nil {
if screen != nil && !lockPollEvent {
events <- screen.PollEvent()
time.Sleep(1 * time.Millisecond)
}
}
}()