patch 7.4.774
Problem: When using the CompleteDone autocommand event it's difficult to
get to the completed items.
Solution: Add the v:completed_items variable. (Shougo Matsu)
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index ff05fe5..2b7b987 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -505,6 +505,8 @@
CompleteDone After Insert mode completion is done. Either
when something was completed or abandoning
completion. |ins-completion|
+ The |v:completed_item| variable contains
+ information about the completed item.
*CursorHold*
CursorHold When the user doesn't press a key for the time
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index c416d77..d139b12 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1330,6 +1330,12 @@
can only be used in autocommands. For user commands |<bang>|
can be used.
+ *v:completed_item* *completed_item-variable*
+v:completed_item
+ |Dictionary| containing the |complete-items| for the most
+ recently completed word after |CompleteDone|. The
+ |Dictionary| is empty if the completion failed.
+
*v:count* *count-variable*
v:count The count given for the last Normal mode command. Can be used
to get the count before a mapping. Read-only. Example: >