mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48:18 +00:00
refactor: do more in TRY_WRAP
This commit is contained in:
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user