forked from aniani/vim
patch 8.2.3411: Vim9: crash when using base name of import
Problem: Vim9: crash when using base name of import. (Naohiro Ono) Solution: Check the import flags. (closes #8843)
This commit is contained in:
@@ -3260,6 +3260,12 @@ set_var_const(
|
||||
semsg(_(e_redefining_imported_item_str), name);
|
||||
goto failed;
|
||||
}
|
||||
if (import->imp_flags & IMP_FLAGS_STAR)
|
||||
{
|
||||
semsg(_(e_cannot_use_str_itself_it_is_imported_with_star),
|
||||
name);
|
||||
goto failed;
|
||||
}
|
||||
sv = ((svar_T *)si->sn_var_vals.ga_data) + import->imp_var_vals_idx;
|
||||
|
||||
where.wt_variable = TRUE;
|
||||
|
Reference in New Issue
Block a user