feat(complete): specify reason for CompleteDone

Problem: `CompleteDone` currently does not specify the reason for why completion was done, which is problematic for completion plugins as they cannot know whether the event was triggered due to the completion being canceled, accepted, or for some other reason.

Solution: Add a `reason` key to `v:event`, which is set by `CompleteDone` to indicate why completion ended.
This commit is contained in:
Famiu Haque
2024-05-24 15:57:46 +06:00
committed by GitHub
parent d123202ae6
commit a616272f56
7 changed files with 71 additions and 2 deletions

View File

@@ -215,6 +215,7 @@ M.vars = {
changed_window Is |v:true| if the event fired while
changing window (or tab) on |DirChanged|.
status Job status or exit code, -1 means "unknown". |TermClose|
reason Reason for completion being done. |CompleteDone|
]=],
},
exception = {