shada: fix write E5004 error on exit

Fix the problem of failing to write shada when the global variable contains
Funcref or Partial.
This commit is contained in:
erw7
2020-06-07 01:31:23 +09:00
parent dbc8ec9446
commit 9fc3949841
3 changed files with 24 additions and 13 deletions

View File

@@ -2676,6 +2676,13 @@ static ShaDaWriteResult shada_write(ShaDaWriteDef *const sd_writer,
if (name == NULL) {
break;
}
switch (vartv.v_type) {
case VAR_FUNC:
case VAR_PARTIAL:
continue;
default:
break;
}
typval_T tgttv;
tv_copy(&vartv, &tgttv);
ShaDaWriteResult spe_ret;