patch 9.1.1509: patch 9.1.1505 was not good
Problem: Patch 9.1.1505 was not good
Solution: Revert "patch 9.1.1505: not possible to return completion type
for :ex command" and instead add the getcompletiontype()
function (Hirohito Higashi).
related: #17606
closes: #17662
Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 6ba698d..ec21087 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -2264,7 +2264,7 @@
ret_string, f_getcharstr},
{"getcmdcomplpat", 0, 0, 0, NULL,
ret_string, f_getcmdcomplpat},
- {"getcmdcompltype", 0, 1, FEARG_1, NULL,
+ {"getcmdcompltype", 0, 0, 0, NULL,
ret_string, f_getcmdcompltype},
{"getcmdline", 0, 0, 0, NULL,
ret_string, f_getcmdline},
@@ -2280,6 +2280,8 @@
ret_string, f_getcmdwintype},
{"getcompletion", 2, 3, FEARG_1, arg3_string_string_bool,
ret_list_string, f_getcompletion},
+ {"getcompletiontype", 1, 1, FEARG_1, arg1_string,
+ ret_string, f_getcompletiontype},
{"getcurpos", 0, 1, FEARG_1, arg1_number,
ret_list_number, f_getcurpos},
{"getcursorcharpos", 0, 1, FEARG_1, arg1_number,