mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-10 22:52:51 +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)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if event == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if e, ok := event.(*tcell.EventError); ok {
|
if e, ok := event.(*tcell.EventError); ok {
|
||||||
log.Println("tcell event error: ", e.Error())
|
log.Println("tcell event error: ", e.Error())
|
||||||
|
|
||||||
@@ -469,12 +473,10 @@ func DoEvent() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ulua.Lock.Lock()
|
ulua.Lock.Lock()
|
||||||
// if event != nil {
|
|
||||||
if action.InfoBar.HasPrompt {
|
if action.InfoBar.HasPrompt {
|
||||||
action.InfoBar.HandleEvent(event)
|
action.InfoBar.HandleEvent(event)
|
||||||
} else {
|
} else {
|
||||||
action.Tabs.HandleEvent(event)
|
action.Tabs.HandleEvent(event)
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
ulua.Lock.Unlock()
|
ulua.Lock.Unlock()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user