1
0
Fork 0
mirror of https://git.sr.ht/~rjarry/aerc synced 2025-02-22 06:23:58 +01:00
aerc/completer
Tim Culverhouse 5b57d24afd textinput: make completions run async with cancellation
Make the Completer interface accept a context.Context. Provide a
cancellation feature on text input tab completion to cancel an inflight
completion command. This is particularly useful for address book
completion if the user has specified a network-accessing command, eg
carddav-query. The command is started according to the completion delay,
but is cancellable if another request comes in. We also check for
cancellation after the request is complete to ensure we only show valid
completion results.

Changelog-changed: Tab completions for text fields are run
 asynchronously. In-flight requests are cancelled when new input
 arrives.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2024-10-24 22:13:51 +02:00
..
completer.go textinput: make completions run async with cancellation 2024-10-24 22:13:51 +02:00