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

patch 8.2.1329: Vim9: cannot define global function inside :def function

Problem:    Vim9: cannot define global function inside :def function.
Solution:   Assign to global variable instead of local. (closes #6584)
This commit is contained in:
Bram Moolenaar
2020-07-31 22:05:04 +02:00
parent 4d4d1cd5c8
commit 38ddf333f6
11 changed files with 237 additions and 12 deletions

View File

@@ -1546,6 +1546,7 @@ typedef enum {
/*
* Structure to hold info for a user function.
* When adding a field check copy_func().
*/
typedef struct
{
@@ -1618,6 +1619,7 @@ typedef struct
#define FC_NOARGS 0x200 // no a: variables in lambda
#define FC_VIM9 0x400 // defined in vim9 script file
#define FC_CFUNC 0x800 // defined as Lua C func
#define FC_COPY 0x1000 // copy of another function by copy_func()
#define MAX_FUNC_ARGS 20 // maximum number of function arguments
#define VAR_SHORT_LEN 20 // short variable name length