On Thu, Jan 20, 2022 at 8:39 PM Bram Moolenaar wrote:

> Patch 8.2.4163
> Problem:    No error for omitting function name after autoload prefix.
> Solution:   Check for missing function name. (issue #9577)
> Files:      src/userfunc.c, src/testdir/test_vim9_import.vim

This patch broke my configuration: vim-8.2.4162 was fine,
but starting at vim-8.2.4163, I get errors like these when I start vim:

((HEAD detached at v8.2.4163))pel@pel-cirrus7:~/sb/vim/src$ ./vim
Error detected while processing
/home/pel/.vimrc[7]../home/pel/.vim/autoload/plug.vim:
line  619:
E129: Function name required
line  620:
E121: Undefined variable: a:0
line  621:
E133: :return not inside a function
Error detected while processing
/home/pel/.vimrc[7]../home/pel/.vim/autoload/plug.vim[636]../home/pel/.vimrc[7]../home/pel/.vim/autoload/plug.vim:
line  635:
E133: :return not inside a function
Error detected while processing /home/pel/.vimrc:
line  402:
E185: Cannot find color scheme 'rastafari'
Press ENTER or type command to continue

The code in /home/pel/.vim/autoload/plug.vim:619 looks like this:

 619 function! plug#(repo, ...)
 620   if a:0 > 1
 621     return s:err('Invalid number of arguments (1..2)')
 622   endif
 623
 624   try
 625     let repo = s:trim(a:repo)
 626     let opts = a:0 == 1 ? s:parse_options(a:1) : s:base_spec
 627     let name = get(opts, 'as', s:plug_fnamemodify(repo, ':t:s?\.git$??'))
 628     let spec = extend(s:infer_properties(name, repo), opts)
 629     if !has_key(g:plugs, name)
 630       call add(g:plugs_order, name)
 631     endif
 632     let g:plugs[name] = spec
 633     let s:loaded[name] = get(s:loaded, name, 0)
 634   catch
 635     return s:err(repo . ' ' . v:exception)
 636   endtry
 637 endfunction

I just re-installed the latest https://github.com/junegunn/vim-plug
(git tag 0.11.0) the problem is still there except that it's now at
line 709 in https://github.com/junegunn/vim-plug/blob/master/plug.vim :

 709 function! plug#(repo, ...)
 710   if a:0 > 1
 711     return s:err('Invalid number of arguments (1..2)')
 712   endif
  ...

I suppose that I won't be the only stumbling upon this error
as vim-plug is quite popular.

Regards
Dominique

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAON-T_iwACbh4QjQ%2BEtqLEBaOZz%3DKiXae1mJs%3DsP3bqe1%2BhJxA%40mail.gmail.com.

Raspunde prin e-mail lui