diff options
author | Michael Ennen <mike.ennen@gmail.com> | 2016-12-17 13:07:37 -0700 |
---|---|---|
committer | Michael Ennen <mike.ennen@gmail.com> | 2017-02-14 17:38:17 -0700 |
commit | 9f6f7fe26d7caa89083f5d5b00c55bf2046591ca (patch) | |
tree | e5a2b9c4cd845a4d502f287fe31a25d117889af0 /src/nvim/eval.h | |
parent | 6563d859904837790515d790ecadaa4f06064471 (diff) | |
download | rneovim-9f6f7fe26d7caa89083f5d5b00c55bf2046591ca.tar.gz rneovim-9f6f7fe26d7caa89083f5d5b00c55bf2046591ca.tar.bz2 rneovim-9f6f7fe26d7caa89083f5d5b00c55bf2046591ca.zip |
vim-patch:7.4.2119
Problem: Closures are not supported.
Solution: Capture variables in lambdas from the outer scope. (Yasuhiro
Matsumoto, Ken Takata)
https://github.com/vim/vim/commit/1e96d9bf98f9ab84d5af7f98d6a961d91b17364f
Diffstat (limited to 'src/nvim/eval.h')
-rw-r--r-- | src/nvim/eval.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/eval.h b/src/nvim/eval.h index 3aba7e462f..147aba4c19 100644 --- a/src/nvim/eval.h +++ b/src/nvim/eval.h @@ -13,6 +13,8 @@ // All user-defined functions are found in this hashtable. extern hashtab_T func_hashtab; +typedef struct funccall_S funccall_T; + // Structure to hold info for a user function. typedef struct ufunc ufunc_T; @@ -40,6 +42,7 @@ struct ufunc { scid_T uf_script_ID; ///< ID of script where function was defined, // used for s: variables int uf_refcount; ///< for numbered function: reference count + funccall_T *uf_scoped; ///< l: local variables for closure char_u uf_name[1]; ///< name of function (actually longer); can // start with <SNR>123_ (<SNR> is K_SPECIAL // KS_EXTRA KE_SNR) |