fix(heredoc): allow missing end marker for scripts

Also do not crash when getting heredoc fails.
This commit is contained in:
zeertzjq
2023-04-29 09:23:31 +08:00
parent 2eb1f62e29
commit 7b6d041bae
3 changed files with 19 additions and 12 deletions

View File

@@ -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;
}