diff options
Diffstat (limited to 'src/nvim/spellsuggest.c')
-rw-r--r-- | src/nvim/spellsuggest.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/spellsuggest.c b/src/nvim/spellsuggest.c index 1852f75432..af9f4db45a 100644 --- a/src/nvim/spellsuggest.c +++ b/src/nvim/spellsuggest.c @@ -3141,8 +3141,7 @@ static void check_suggestions(suginfo_T *su, garray_T *gap) // Need to append what follows to check for "the the". xstrlcpy(longword, stp[i].st_word, MAXWLEN + 1); int len = stp[i].st_wordlen; - xstrlcpy(longword + len, su->su_badptr + stp[i].st_orglen, - (size_t)(MAXWLEN - len + 1)); + xstrlcpy(longword + len, su->su_badptr + stp[i].st_orglen, MAXWLEN + 1 - (size_t)len); hlf_T attr = HLF_COUNT; (void)spell_check(curwin, longword, &attr, NULL, false); if (attr != HLF_COUNT) { |