diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-02-11 10:24:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-11 10:24:46 +0100 |
commit | c8c930ea785aa393ebc819139913a9e05f0ccd45 (patch) | |
tree | 7ec328fa4a13dbac9a71361e6036c4d1952f9c10 /src/nvim/spell.c | |
parent | c9b0fe1f41ebaa6815a69ac614a5b2d1bab6f720 (diff) | |
download | rneovim-c8c930ea785aa393ebc819139913a9e05f0ccd45.tar.gz rneovim-c8c930ea785aa393ebc819139913a9e05f0ccd45.tar.bz2 rneovim-c8c930ea785aa393ebc819139913a9e05f0ccd45.zip |
refactor: reduce scope of locals as per the style guide (#22206)
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r-- | src/nvim/spell.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c index 2204cda169..8ef3aed417 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -380,7 +380,7 @@ size_t spell_check(win_T *wp, char *ptr, hlf_T *attrp, int *capcol, bool docount MB_PTR_ADV(mi.mi_end); } else if (mi.mi_result == SP_BAD && LANGP_ENTRY(wp->w_s->b_langp, 0)->lp_slang->sl_nobreak) { - char *p, *fp; + char *p; int save_result = mi.mi_result; // First language in 'spelllang' is NOBREAK. Find first position @@ -388,7 +388,7 @@ size_t spell_check(win_T *wp, char *ptr, hlf_T *attrp, int *capcol, bool docount mi.mi_lp = LANGP_ENTRY(wp->w_s->b_langp, 0); if (mi.mi_lp->lp_slang->sl_fidxs != NULL) { p = mi.mi_word; - fp = mi.mi_fword; + char *fp = mi.mi_fword; for (;;) { MB_PTR_ADV(p); MB_PTR_ADV(fp); @@ -2834,7 +2834,6 @@ static void spell_soundfold_wsal(slang_T *slang, const char *inword, char *res) int j, z; int reslen; int k = 0; - int z0; int k0; int n0; int pri; @@ -2875,7 +2874,7 @@ static void spell_soundfold_wsal(slang_T *slang, const char *inword, char *res) while ((c = word[i]) != NUL) { // Start with the first rule that has the character in the word. int n = slang->sl_sal_first[c & 0xff]; - z0 = 0; + int z0 = 0; if (n >= 0) { // Check all rules for the same index byte. |