micro: Don't forward nil events into the sub event handler (#2992)

This commit is contained in:
Jöran Karl 2024-03-12 18:35:33 +01:00 committed by GitHub
parent c15abea64c
commit 0de16334d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()
}