mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.1207: Vim9: crash in expr test when run in the GUI
Problem: Vim9: crash in expr test when run in the GUI. Solution: Break out of loop over hashtab also when function got removed and added.
This commit is contained in:
@@ -1563,10 +1563,8 @@ def Test_expr7_method_call()
|
|||||||
enddef
|
enddef
|
||||||
|
|
||||||
func Test_expr7_trailing_fails()
|
func Test_expr7_trailing_fails()
|
||||||
" Temporarily commented out - somehow crash occurs with too many
|
call CheckDefFailure(['let l = [2]', 'l->{l -> add(l, 8)}'], 'E107')
|
||||||
" CheckDefFailure calls in the GUI only.
|
call CheckDefFailure(['let l = [2]', 'l->{l -> add(l, 8)} ()'], 'E274')
|
||||||
" call CheckDefFailure(['let l = [2]', 'l->{l -> add(l, 8)}'], 'E107')
|
|
||||||
" call CheckDefFailure(['let l = [2]', 'l->{l -> add(l, 8)} ()'], 'E274')
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_expr_fails()
|
func Test_expr_fails()
|
||||||
|
@@ -3444,8 +3444,8 @@ ex_function(exarg_T *eap)
|
|||||||
void
|
void
|
||||||
ex_defcompile(exarg_T *eap UNUSED)
|
ex_defcompile(exarg_T *eap UNUSED)
|
||||||
{
|
{
|
||||||
long_u ht_used = func_hashtab.ht_used;
|
long todo = (long)func_hashtab.ht_used;
|
||||||
int todo = (int)ht_used;
|
int changed = func_hashtab.ht_changed;
|
||||||
hashitem_T *hi;
|
hashitem_T *hi;
|
||||||
ufunc_T *ufunc;
|
ufunc_T *ufunc;
|
||||||
|
|
||||||
@@ -3460,12 +3460,12 @@ ex_defcompile(exarg_T *eap UNUSED)
|
|||||||
{
|
{
|
||||||
compile_def_function(ufunc, FALSE, NULL);
|
compile_def_function(ufunc, FALSE, NULL);
|
||||||
|
|
||||||
if (func_hashtab.ht_used != ht_used)
|
if (func_hashtab.ht_changed != changed)
|
||||||
{
|
{
|
||||||
// another function has been defined, need to start over
|
// a function has been added or removed, need to start over
|
||||||
|
todo = (long)func_hashtab.ht_used;
|
||||||
|
changed = func_hashtab.ht_changed;
|
||||||
hi = func_hashtab.ht_array;
|
hi = func_hashtab.ht_array;
|
||||||
ht_used = func_hashtab.ht_used;
|
|
||||||
todo = (int)ht_used;
|
|
||||||
--hi;
|
--hi;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -754,6 +754,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1207,
|
||||||
/**/
|
/**/
|
||||||
1206,
|
1206,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user