mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 22:27:13 +09:00
Add bracket surround
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user