mirror of
https://github.com/zyedidia/micro
synced 2024-09-30 05:06:02 +00:00
micro: Don't forward nil events into the sub event handler (#2992)
This commit is contained in:
parent
c15abea64c
commit
0de16334d3
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue