aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/vimscript.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-14 07:22:01 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-04-14 09:23:40 +0800
commitbd83b587b18bb6f2ac555a992fa5b7d907de7e79 (patch)
treeabb4200b782b5ce998e660613bb3ee89aa01a211 /src/nvim/api/vimscript.c
parentf64f6706e58061f0a3de530edd1f10e331cd1525 (diff)
downloadrneovim-bd83b587b18bb6f2ac555a992fa5b7d907de7e79.tar.gz
rneovim-bd83b587b18bb6f2ac555a992fa5b7d907de7e79.tar.bz2
rneovim-bd83b587b18bb6f2ac555a992fa5b7d907de7e79.zip
vim-patch:8.2.1047: Vim9: script cannot use line continuation like :def function
Problem: Vim9: script cannot use line continuation like in a :def function. Solution: Pass the getline function pointer to the eval() functions. Use it for addition and multiplication operators. https://github.com/vim/vim/commit/5409f5d8c95007216ae1190565a7a8ee9ebd7100 Omit source_nextline() and eval_next_non_blank(): Vim9 script only. N/A patches for version.c: vim-patch:8.2.1048: build failure without the eval feature Problem: Build failure without the eval feature. Solution: Add dummy typedef. https://github.com/vim/vim/commit/9d40c63c7dc8c3eb3886c58dcd334bc7f37eceba vim-patch:8.2.1052: build failure with older compilers Problem: Build failure with older compilers. Solution: Move declaration to start of block. https://github.com/vim/vim/commit/7acde51832f383f9a6d2e740cd0420b433ea841a Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/api/vimscript.c')
-rw-r--r--src/nvim/api/vimscript.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/api/vimscript.c b/src/nvim/api/vimscript.c
index 1740429ef6..d2e18f08f3 100644
--- a/src/nvim/api/vimscript.c
+++ b/src/nvim/api/vimscript.c
@@ -172,7 +172,7 @@ Object nvim_eval(String expr, Error *err)
int ok;
TRY_WRAP(err, {
- ok = eval0(expr.data, &rettv, NULL, EVAL_EVALUATE);
+ ok = eval0(expr.data, &rettv, NULL, &EVALARG_EVALUATE);
});
if (!ERROR_SET(err)) {
@@ -290,7 +290,7 @@ Object nvim_call_dict_function(Object dict, String fn, Array args, Error *err)
switch (dict.type) {
case kObjectTypeString:
try_start();
- if (eval0(dict.data.string.data, &rettv, NULL, EVAL_EVALUATE) == FAIL) {
+ if (eval0(dict.data.string.data, &rettv, NULL, &EVALARG_EVALUATE) == FAIL) {
api_set_error(err, kErrorTypeException,
"Failed to evaluate dict expression");
}