mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 16:58:17 +00:00
vim-patch:8.2.3216: Vim9: crash when using variable in a loop at script level
Problem: Vim9: crash when using variable in a loop at script level.
Solution: Do not clear the variable if a function was defined.
Do not create a new entry in sn_var_vals every time.
(closes vim/vim#8628)
2eb6fc3b52
Omit eval_cstack: Vim9 script only.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -695,9 +695,11 @@ void eval_patch(const char *const origfile, const char *const difffile, const ch
|
||||
void fill_evalarg_from_eap(evalarg_T *evalarg, exarg_T *eap, bool skip)
|
||||
{
|
||||
*evalarg = (evalarg_T){ .eval_flags = skip ? 0 : EVAL_EVALUATE };
|
||||
if (eap != NULL && getline_equal(eap->getline, eap->cookie, getsourceline)) {
|
||||
evalarg->eval_getline = eap->getline;
|
||||
evalarg->eval_cookie = eap->cookie;
|
||||
if (eap != NULL) {
|
||||
if (getline_equal(eap->getline, eap->cookie, getsourceline)) {
|
||||
evalarg->eval_getline = eap->getline;
|
||||
evalarg->eval_cookie = eap->cookie;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user