mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-06 07:00:24 +09:00
micro: Don't forward nil events into the sub event handler (#2992)
This commit is contained in:
@@ -449,6 +449,10 @@ func DoEvent() {
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
if event == nil {
|
||||
return
|
||||
}
|
||||
|
||||
if e, ok := event.(*tcell.EventError); ok {
|
||||
log.Println("tcell event error: ", e.Error())
|
||||
|
||||
@@ -469,12 +473,10 @@ func DoEvent() {
|
||||
}
|
||||
|
||||
ulua.Lock.Lock()
|
||||
// if event != nil {
|
||||
if action.InfoBar.HasPrompt {
|
||||
action.InfoBar.HandleEvent(event)
|
||||
} else {
|
||||
action.Tabs.HandleEvent(event)
|
||||
}
|
||||
// }
|
||||
ulua.Lock.Unlock()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user