completion: install panic handler in completion callback
This callback is actually invoked in a goroutine by time.AfterFunc. The panic handler must be explicitly installed. Link: https://github.com/golang/go/blob/go1.18/src/time/sleep.go#L160-L173 Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
This commit is contained in:
parent
037676f7cc
commit
73b64f2bf9
1 changed files with 2 additions and 0 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
"github.com/mattn/go-runewidth"
|
||||
|
||||
"git.sr.ht/~rjarry/aerc/config"
|
||||
"git.sr.ht/~rjarry/aerc/logging"
|
||||
)
|
||||
|
||||
// TODO: Attach history providers
|
||||
|
@ -280,6 +281,7 @@ func (ti *TextInput) updateCompletions() {
|
|||
}
|
||||
if ti.completeDebouncer == nil {
|
||||
ti.completeDebouncer = time.AfterFunc(ti.completeDelay, func() {
|
||||
defer logging.PanicHandler()
|
||||
ti.showCompletions()
|
||||
})
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue