fix(api): limit depth of nvim_cmd (#27225)

This commit is contained in:
zeertzjq
2024-01-27 14:03:44 +08:00
committed by GitHub
parent 38bb0e1da8
commit 7367838359
3 changed files with 87 additions and 12 deletions

View File

@@ -151,7 +151,7 @@ bool try_end(Error *err)
if (should_free) {
xfree(msg);
}
} else if (did_throw) {
} else if (did_throw || need_rethrow) {
if (*current_exception->throw_name != NUL) {
if (current_exception->throw_lnum != 0) {
api_set_error(err, kErrorTypeException, "%s, line %" PRIdLINENR ": %s",