Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
micro: Don't forward nil events into the sub event handler
  • Loading branch information
JoeKar committed Nov 2, 2023
commit c342635f3dcc8ca646d792df97f893a10709bf78
6 changes: 4 additions & 2 deletions cmd/micro/micro.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())

Expand All @@ -469,12 +473,10 @@ func DoEvent() {
}

ulua.Lock.Lock()
// if event != nil {
JoeKar marked this conversation as resolved.
Show resolved Hide resolved
if action.InfoBar.HasPrompt {
action.InfoBar.HandleEvent(event)
} else {
action.Tabs.HandleEvent(event)
}
// }
ulua.Lock.Unlock()
}