From 3285cd6eccd9b7f33cc32f992c2607c3fc4ca13f Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Wed, 22 Mar 2023 10:09:28 +0000 Subject: refactor: do more in TRY_WRAP --- src/nvim/lua/stdlib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/nvim/lua/stdlib.c') diff --git a/src/nvim/lua/stdlib.c b/src/nvim/lua/stdlib.c index 852e10c8d8..ee5676e927 100644 --- a/src/nvim/lua/stdlib.c +++ b/src/nvim/lua/stdlib.c @@ -287,10 +287,8 @@ int nlua_regex(lua_State *lstate) const char *text = luaL_checkstring(lstate, 1); regprog_T *prog = NULL; - TRY_WRAP({ - try_start(); + TRY_WRAP(&err, { prog = vim_regcomp((char *)text, RE_AUTO | RE_MAGIC | RE_STRICT); - try_end(&err); }); if (ERROR_SET(&err)) { -- cgit