diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-11-14 00:02:29 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-14 00:02:29 -0800 |
commit | e3b08a0fc43eef91b51f8166a036e86b5bdf5613 (patch) | |
tree | aab224f640e8986e377c6d5a7615077f6b8d3f7d /src/nvim/spell.c | |
parent | 570ee5f404966a6ffd9a5241d91adc6a9f5f2c9d (diff) | |
parent | a0c18bf2017ac7d38d13014a810bda44d09dfcbb (diff) | |
download | rneovim-e3b08a0fc43eef91b51f8166a036e86b5bdf5613.tar.gz rneovim-e3b08a0fc43eef91b51f8166a036e86b5bdf5613.tar.bz2 rneovim-e3b08a0fc43eef91b51f8166a036e86b5bdf5613.zip |
Merge #11384 from janlazo/vim-8.1.2293
vim-patch:8.1.{927,2293}
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r-- | src/nvim/spell.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c index 687c86b4a8..5feb7efda9 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -1910,11 +1910,11 @@ int init_syl_tab(slang_T *slang) // Count the number of syllables in "word". // When "word" contains spaces the syllables after the last space are counted. // Returns zero if syllables are not defines. -static int count_syllables(slang_T *slang, char_u *word) +static int count_syllables(slang_T *slang, const char_u *word) + FUNC_ATTR_NONNULL_ALL { int cnt = 0; bool skip = false; - char_u *p; int len; syl_item_T *syl; int c; @@ -1922,7 +1922,7 @@ static int count_syllables(slang_T *slang, char_u *word) if (slang->sl_syllable == NULL) return 0; - for (p = word; *p != NUL; p += len) { + for (const char_u *p = word; *p != NUL; p += len) { // When running into a space reset counter. if (*p == ' ') { len = 1; @@ -2625,9 +2625,10 @@ static bool spell_mb_isword_class(int cl, const win_T *wp) // Returns true if "p" points to a word character. // Wide version of spell_iswordp(). -static bool spell_iswordp_w(int *p, win_T *wp) +static bool spell_iswordp_w(const int *p, const win_T *wp) + FUNC_ATTR_NONNULL_ALL { - int *s; + const int *s; if (*p < 256 ? wp->w_s->b_spell_ismw[*p] : (wp->w_s->b_spell_ismw_mb != NULL |