0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.4584: error for using autoload function in custom completion

Problem:    Error for using autoload function in custom completion.
Solution:   Do not check for errors when using an autoload function.
            (closes #9962)
This commit is contained in:
Bram Moolenaar
2022-03-17 11:46:55 +00:00
parent 4f6e772c9c
commit da6d42c35a
3 changed files with 28 additions and 4 deletions

View File

@@ -705,10 +705,9 @@ call_vim_function(
// The name might be "import.Func" or "Funcref". We don't know, we need to
// ignore errors for an undefined name. But we do want errors when an
// autoload script has errors. Guess that when there is a dot or '#' in
// the name showing errors is the right choice.
ignore_errors = vim_strchr(func, '.') == NULL
&& vim_strchr(func, AUTOLOAD_CHAR) == NULL;
// autoload script has errors. Guess that when there is a dot in the name
// showing errors is the right choice.
ignore_errors = vim_strchr(func, '.') == NULL;
arg = func;
if (ignore_errors)
++emsg_off;