mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 01:38:16 +00:00
vim-patch:8.2.{0695,0725,0734,0753,0818,0819,0822} (#23075)
vim-patch:8.2.0695: Vim9: cannot define a function inside a function Problem: Vim9: cannot define a function inside a function. Solution: Initial support for :def inside :def.04b1269783
vim-patch:8.2.0725: Vim9: cannot call a function declared later in Vim9 script Problem: Vim9: cannot call a function declared later in Vim9 script. Solution: Make two passes through the script file.09689a0284
vim-patch:8.2.0734: Vim9: leaking memory when using :finish Problem: Vim9: leaking memory when using :finish. Solution: Do not check for next line in third pass.04816717df
vim-patch:8.2.0753: Vim9: expressions are evaluated in the discovery phase Problem: Vim9: expressions are evaluated in the discovery phase. Solution: Bail out if an expression is not a constant. Require a type for declared constants.32e351179e
vim-patch:8.2.0818: Vim9: using a discovery phase doesn't work well Problem: Vim9: using a discovery phase doesn't work well. Solution: Remove the discovery phase, instead compile a function only when it is used. Add :defcompile to compile def functions earlier.822ba24743
vim-patch:8.2.0819: compiler warning for unused variable Problem: Compiler warning for unused variable. Solution: Remove the variable.f40e51a880
vim-patch:8.2.0822: Vim9: code left over from discovery phase Problem: Vim9: code left over from discovery phase. Solution: Remove the dead code.2eec37926d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -172,7 +172,7 @@ Object nvim_eval(String expr, Error *err)
|
||||
int ok;
|
||||
|
||||
TRY_WRAP(err, {
|
||||
ok = eval0(expr.data, &rettv, NULL, true);
|
||||
ok = eval0(expr.data, &rettv, NULL, EVAL_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, true) == FAIL) {
|
||||
if (eval0(dict.data.string.data, &rettv, NULL, EVAL_EVALUATE) == FAIL) {
|
||||
api_set_error(err, kErrorTypeException,
|
||||
"Failed to evaluate dict expression");
|
||||
}
|
||||
|
Reference in New Issue
Block a user