aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/spell.c
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2023-02-11 14:14:24 +0100
committerGitHub <noreply@github.com>2023-02-11 14:14:24 +0100
commit27177e581902967dcf4f2f426464da1b636ca420 (patch)
treeba52f1e21ad2c4d4a00dc4af9fa602ae27bb86df /src/nvim/lua/spell.c
parent224a3c77caa6fea8299eb3be326fa6ff7300a21b (diff)
downloadrneovim-27177e581902967dcf4f2f426464da1b636ca420.tar.gz
rneovim-27177e581902967dcf4f2f426464da1b636ca420.tar.bz2
rneovim-27177e581902967dcf4f2f426464da1b636ca420.zip
refactor: reduce scope of locals as per the style guide (#22211)
Diffstat (limited to 'src/nvim/lua/spell.c')
-rw-r--r--src/nvim/lua/spell.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/lua/spell.c b/src/nvim/lua/spell.c
index d510d25e90..78e023c26d 100644
--- a/src/nvim/lua/spell.c
+++ b/src/nvim/lua/spell.c
@@ -51,7 +51,6 @@ int nlua_spell_check(lua_State *lstate)
}
hlf_T attr = HLF_COUNT;
- size_t len = 0;
size_t pos = 0;
int capcol = -1;
int no_res = 0;
@@ -61,7 +60,7 @@ int nlua_spell_check(lua_State *lstate)
while (*str != NUL) {
attr = HLF_COUNT;
- len = spell_check(curwin, (char *)str, &attr, &capcol, false);
+ size_t len = spell_check(curwin, (char *)str, &attr, &capcol, false);
assert(len <= INT_MAX);
if (attr != HLF_COUNT) {