Skip to content

Instantly share code, notes, and snippets.

@mattia72
Last active November 4, 2022 09:57
Show Gist options
  • Save mattia72/ad3c38f1a854f639ec8a2f3c412edff1 to your computer and use it in GitHub Desktop.
Save mattia72/ad3c38f1a854f639ec8a2f3c412edff1 to your computer and use it in GitHub Desktop.
AsyncRun -post: Error detected while processing function AsyncRun_Job_OnTimer ... 99_AsyncRun_Job_OnFinish: E107: Missing parentheses
Error E107 raises, if -post function is defined like this
```
command! -bang -bar -nargs=? -complete=file_in_path DelphiMake
\ call delphi#SetDefaultShell()
\| execute 'AsyncRun'.<bang>.' -post='.fnameescape('call delphi#PostBuildSteps()').' -auto=make -program=make @ /p:config='.g:delphi_build_config.' '.delphi#FindProject(<f-args>))
\| call delphi#RestoreOrigShell()
```
Error disapears if function call has g: prefix and between () has a space
```
execute 'AsyncRun'.<bang>.' -post='.fnameescape('call g:delphi#PostBuildSteps( )').' -auto=make -program=make @ /p:config='.g:delphi_build_config.' '.delphi#FindProject(<f-args>))
```
https://github.com/vim/vim/issues/6613
@mattia72
Copy link
Author

mattia72 commented Nov 4, 2022

If function have a number as parameter, then the Error occurs again :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment