Patch 9.0.1218
Problem: Completion includes functions that don't work.
Solution: Skip functions that are not implemented. (Kota Kato,
closes #11845)
Files: src/evalfunc.c, src/testdir/test_cmdline.vim
*** ../vim-9.0.1217/src/evalfunc.c 2023-01-17 18:31:20.427373305 +0000
--- src/evalfunc.c 2023-01-18 15:26:20.440139724 +0000
***************
*** 2872,2877 ****
--- 2872,2881 ----
}
if (++intidx < (int)ARRAY_LENGTH(global_functions))
{
+ // Skip if the function doesn't have an implementation (feature not
+ // implemented).
+ if (global_functions[intidx].f_func == NULL)
+ return (char_u *)"";
STRCPY(IObuff, global_functions[intidx].f_name);
STRCAT(IObuff, "(");
if (global_functions[intidx].f_max_argc == 0)
*** ../vim-9.0.1217/src/testdir/test_cmdline.vim 2023-01-04 18:59:53.457710839 +0000
--- src/testdir/test_cmdline.vim 2023-01-18 15:27:09.528158027 +0000
***************
*** 489,494 ****
--- 489,500 ----
let l = getcompletion('paint', 'function')
call assert_equal([], l)
+ if !has('ruby')
+ " global_functions[] has an entry but it doesn't have an implemention
+ let l = getcompletion('ruby', 'function')
+ call assert_equal([], l)
+ endif
+
let Flambda = {-> 'hello'}
let l = getcompletion('', 'function')
let l = filter(l, {i, v -> v =~ 'lambda'})
*** ../vim-9.0.1217/src/version.c 2023-01-18 14:51:03.771305354 +0000
--- src/version.c 2023-01-18 15:24:46.564104335 +0000
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1218,
/**/
--
Q: Why do Norwegians excel at text editing?
A: Their ancestors are Vi-kings
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///