diff src/ex_cmds2.c @ 13551:1fd0f8392946 v8.0.1649

patch 8.0.1649: no completion for argument list commands commit https://github.com/vim/vim/commit/cd43effecab02c6c28b1c4a3a14f91b8c3f26c0d Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 29 15:55:38 2018 +0200 patch 8.0.1649: no completion for argument list commands Problem: No completion for argument list commands. Solution: Add arglist completion. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/2706)
author Christian Brabandt <cb@256bit.org>
date Thu, 29 Mar 2018 16:00:07 +0200
parents 33eea5ce5415
children 04019fc3de93
line wrap: on
line diff
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -3314,6 +3314,21 @@ alist_add_list(
 
 #endif /* FEAT_LISTCMDS */
 
+#if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+/*
+ * Function given to ExpandGeneric() to obtain the possible arguments of the
+ * argedit and argdelete commands.
+ */
+    char_u *
+get_arglist_name(expand_T *xp UNUSED, int idx)
+{
+    if (idx >= ARGCOUNT)
+	return NULL;
+
+    return alist_name(&ARGLIST[idx]);
+}
+#endif
+
 #ifdef FEAT_EVAL
 /*
  * ":compiler[!] {name}"