diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-04-29 19:33:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-29 19:33:05 +0200 |
commit | 6d4180a0d20d0b730b6e64acdac39261f52a9277 (patch) | |
tree | 2143d3d8f2cc10caee8b94d79d356eee2e762ebd /src/nvim/lua/stdlib.c | |
parent | d5dc3dad80ab1aef1d5e2afcc4d44a779605da8b (diff) | |
parent | eef8de4df0247157e57f306062b1b86e01a41454 (diff) | |
download | rneovim-6d4180a0d20d0b730b6e64acdac39261f52a9277.tar.gz rneovim-6d4180a0d20d0b730b6e64acdac39261f52a9277.tar.bz2 rneovim-6d4180a0d20d0b730b6e64acdac39261f52a9277.zip |
Merge pull request #18162 from dundargoc/refactor/unctustify
refactor/uncrustify
Diffstat (limited to 'src/nvim/lua/stdlib.c')
-rw-r--r-- | src/nvim/lua/stdlib.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/lua/stdlib.c b/src/nvim/lua/stdlib.c index e94c61b37c..52a9a1a84f 100644 --- a/src/nvim/lua/stdlib.c +++ b/src/nvim/lua/stdlib.c @@ -59,8 +59,8 @@ static int regex_match(lua_State *lstate, regprog_T **prog, char_u *str) *prog = rm.regprog; if (match) { - lua_pushinteger(lstate, (lua_Integer)(rm.startp[0]-str)); - lua_pushinteger(lstate, (lua_Integer)(rm.endp[0]-str)); + lua_pushinteger(lstate, (lua_Integer)(rm.startp[0] - str)); + lua_pushinteger(lstate, (lua_Integer)(rm.endp[0] - str)); return 2; } return 0; @@ -110,7 +110,7 @@ static int regex_match_line(lua_State *lstate) return luaL_error(lstate, "invalid row"); } - char_u *line = ml_get_buf(buf, rownr+1, false); + char_u *line = ml_get_buf(buf, rownr + 1, false); size_t len = STRLEN(line); if (start < 0 || (size_t)start > len) { @@ -126,7 +126,7 @@ static int regex_match_line(lua_State *lstate) line[end] = NUL; } - int nret = regex_match(lstate, prog, line+start); + int nret = regex_match(lstate, prog, line + start); if (end >= 0) { line[end] = save; @@ -208,7 +208,7 @@ static int nlua_str_utf_pos(lua_State *const lstate) FUNC_ATTR_NONNULL_ALL size_t idx = 1; size_t clen; for (size_t i = 0; i < s1_len && s1[i] != NUL; i += clen) { - clen = (size_t)utf_ptr2len_len((const char_u *)(s1)+i, (int)(s1_len-i)); + clen = (size_t)utf_ptr2len_len((const char_u *)(s1) + i, (int)(s1_len - i)); lua_pushinteger(lstate, (long)i + 1); lua_rawseti(lstate, -2, (int)idx); idx++; |