aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2016-07-23 11:33:38 +0900
committerJustin M. Keyes <justinkz@gmail.com>2016-08-01 03:33:38 -0400
commit23f591dba078fee16ab6e4debfcd051e799ca4f8 (patch)
tree0a469e39398562b3145821b8b9b1ed124e9b48a1 /src/nvim/ex_docmd.c
parent70ae6ac344472e51ac75316992e2c03464b4f6ad (diff)
downloadrneovim-23f591dba078fee16ab6e4debfcd051e799ca4f8.tar.gz
rneovim-23f591dba078fee16ab6e4debfcd051e799ca4f8.tar.bz2
rneovim-23f591dba078fee16ab6e4debfcd051e799ca4f8.zip
[RFC] vim-patch:7.4.2011, vim-patch:7.4.2012, vim-patch:7.4.2066 #5106
vim-patch:7.4.2011 Problem: It is not easy to get a list of command arguments. Solution: Add getcompletion(). (Yegappan Lakshmanan) https://github.com/vim/vim/commit/aa4d73235bf4deee167aa5314b89ae3d3db334b7 vim-patch:7.4.2012 Problem: Test for getcompletion() does not pass on all systems. Solution: Only test what is supported. https://github.com/vim/vim/commit/0d3e24be5686c0710aa3c6671e4c626d6cb21a5f vim-patch:7.4.2066 Problem: getcompletion() not well tested. Solution: Add more testing. https://github.com/vim/vim/commit/c1fb763184c8ae82300357867fa2070aa94366e9
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 9bc7ec39da..8bae817211 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -5597,6 +5597,17 @@ int parse_compl_arg(char_u *value, int vallen, int *complp,
return OK;
}
+int cmdcomplete_str_to_type(char_u *complete_str)
+{
+ for (int i = 0; command_complete[i].expand != 0; i++) {
+ if (STRCMP(complete_str, command_complete[i].name) == 0) {
+ return command_complete[i].expand;
+ }
+ }
+
+ return EXPAND_NOTHING;
+}
+
static void ex_colorscheme(exarg_T *eap)
{
if (*eap->arg == NUL) {