aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/stdlib.c
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2023-03-22 10:09:28 +0000
committerGitHub <noreply@github.com>2023-03-22 10:09:28 +0000
commit3285cd6eccd9b7f33cc32f992c2607c3fc4ca13f (patch)
tree4357dab570945b69f7ee3c4406c45c1153222049 /src/nvim/lua/stdlib.c
parentc45b5e2c5b0f02742099ebccc44462fe4203e99c (diff)
downloadrneovim-3285cd6eccd9b7f33cc32f992c2607c3fc4ca13f.tar.gz
rneovim-3285cd6eccd9b7f33cc32f992c2607c3fc4ca13f.tar.bz2
rneovim-3285cd6eccd9b7f33cc32f992c2607c3fc4ca13f.zip
refactor: do more in TRY_WRAP
Diffstat (limited to 'src/nvim/lua/stdlib.c')
-rw-r--r--src/nvim/lua/stdlib.c4
1 files changed, 1 insertions, 3 deletions
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)) {