Mercurial > vim
view ci/if_ver-cmd.vim @ 23249:43532077b5ff v8.2.2170
patch 8.2.2170: Vim9: a global function defined in a :def function fails
Commit: https://github.com/vim/vim/commit/f112f30a82f17114d8b08a0fb90928cd19440581
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 20 17:47:52 2020 +0100
patch 8.2.2170: Vim9: a global function defined in a :def function fails
Problem: Vim9: a global function defined in a :def function fails if it
uses the context.
Solution: Create a partial to store the closure context. (see #7410)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 20 Dec 2020 18:00:06 +0100 |
parents | 27ff44268da5 |
children |
line wrap: on
line source
" Provide 'PrintVer' command to print the interface versions. func s:print_ver(lang, ...) if has(a:lang) exec a:lang join(a:000) else echo 'N/A' endif echo '' endfunc command -nargs=+ PrintVer call <SID>print_ver(<f-args>)