From 7b6d041baed712b071acfa8bb71727a5f5e27561 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 29 Apr 2023 09:23:31 +0800 Subject: fix(heredoc): allow missing end marker for scripts Also do not crash when getting heredoc fails. --- src/nvim/lua/executor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/lua/executor.c') diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index 1c1f68b68d..9586b56f3c 100644 --- a/src/nvim/lua/executor.c +++ b/src/nvim/lua/executor.c @@ -1619,7 +1619,7 @@ void ex_lua(exarg_T *const eap) { size_t len; char *code = script_get(eap, &len); - if (eap->skip) { + if (eap->skip || code == NULL) { xfree(code); return; } -- cgit