From 9fc3949841817921a14fa64ae3d657c936acdfc4 Mon Sep 17 00:00:00 2001 From: erw7 Date: Sun, 7 Jun 2020 01:31:23 +0900 Subject: shada: fix write E5004 error on exit Fix the problem of failing to write shada when the global variable contains Funcref or Partial. --- src/nvim/shada.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/nvim/shada.c b/src/nvim/shada.c index 19a14f340b..3b08c8a184 100644 --- a/src/nvim/shada.c +++ b/src/nvim/shada.c @@ -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; -- cgit