mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 05:58:33 +00:00
refactor: reduce scope of locals as per the style guide (#22211)
This commit is contained in:
@@ -1766,13 +1766,12 @@ bool nlua_exec_file(const char *path)
|
||||
|
||||
StringBuilder sb = KV_INITIAL_VALUE;
|
||||
kv_resize(sb, 64);
|
||||
ptrdiff_t read_size = -1;
|
||||
// Read all input from stdin, unless interrupted (ctrl-c).
|
||||
while (true) {
|
||||
if (got_int) { // User canceled.
|
||||
return false;
|
||||
}
|
||||
read_size = file_read(stdin_dup, IObuff, 64);
|
||||
ptrdiff_t read_size = file_read(stdin_dup, IObuff, 64);
|
||||
if (read_size < 0) { // Error.
|
||||
return false;
|
||||
}
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user