diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-20 08:45:15 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-11-07 08:24:48 +0800 |
commit | 1e4adf4b56cb7a360d16c4d04290c50ae7e80fbc (patch) | |
tree | f0ea607c1145fe65f0d898b2b5736f039c87575b /src/nvim/optionstr.c | |
parent | 1508618d4c35dafee2b82726d2d27fae4e314386 (diff) | |
download | rneovim-1e4adf4b56cb7a360d16c4d04290c50ae7e80fbc.tar.gz rneovim-1e4adf4b56cb7a360d16c4d04290c50ae7e80fbc.tar.bz2 rneovim-1e4adf4b56cb7a360d16c4d04290c50ae7e80fbc.zip |
vim-patch:8.2.3725: cannot use a lambda for 'completefunc' and 'omnifunc'
Problem: Cannot use a lambda for 'completefunc' and 'omnifunc'.
Solution: Implement lambda support. (Yegappan Lakshmanan, closes vim/vim#9257)
https://github.com/vim/vim/commit/8658c759f05b317707d56e3b65a5ef63930c7498
Comment out Vim9 script in tests.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'src/nvim/optionstr.c')
-rw-r--r-- | src/nvim/optionstr.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c index abae338daa..b088a4c8c7 100644 --- a/src/nvim/optionstr.c +++ b/src/nvim/optionstr.c @@ -1473,6 +1473,18 @@ char *did_set_string_option(int opt_idx, char **varp, char *oldval, char *errbuf } } } + } else if (gvarp == &p_cfu) { // 'completefunc' + if (set_completefunc_option() == FAIL) { + errmsg = e_invarg; + } + } else if (gvarp == &p_ofu) { // 'omnifunc' + if (set_omnifunc_option() == FAIL) { + errmsg = e_invarg; + } + } else if (gvarp == &p_tsrfu) { // 'thesaurusfunc' + if (set_thesaurusfunc_option() == FAIL) { + errmsg = e_invarg; + } } else if (varp == &p_opfunc) { // 'operatorfunc' if (set_operatorfunc_option() == FAIL) { errmsg = e_invarg; |