Merge pull request #16678 from lewis6991/runtime_file_err

fix(api): re-route nvim_get_runtime_file errors
This commit is contained in:
bfredl
2022-02-16 10:52:38 +01:00
committed by GitHub
2 changed files with 15 additions and 2 deletions

View File

@@ -497,8 +497,12 @@ ArrayOf(String) nvim_get_runtime_file(String name, Boolean all, Error *err)
int flags = DIP_DIRFILE | (all ? DIP_ALL : 0);
do_in_runtimepath((char_u *)(name.size ? name.data : ""),
flags, find_runtime_cb, &rv);
TRY_WRAP({
try_start();
do_in_runtimepath((char_u *)(name.size ? name.data : ""),
flags, find_runtime_cb, &rv);
try_end(err);
});
return rv;
}