diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2025-02-05 23:09:29 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2025-02-05 23:09:29 +0000 |
commit | d5f194ce780c95821a855aca3c19426576d28ae0 (patch) | |
tree | d45f461b19f9118ad2bb1f440a7a08973ad18832 /src/nvim/spell.c | |
parent | c5d770d311841ea5230426cc4c868e8db27300a8 (diff) | |
parent | 44740e561fc93afe3ebecfd3618bda2d2abeafb0 (diff) | |
download | rneovim-rahm.tar.gz rneovim-rahm.tar.bz2 rneovim-rahm.zip |
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r-- | src/nvim/spell.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c index a0fdd46b04..7437a7a32f 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -245,7 +245,7 @@ size_t spell_check(win_T *wp, char *ptr, hlf_T *attrp, int *capcol, bool docount size_t nrlen = 0; // found a number first size_t wrongcaplen = 0; bool count_word = docount; - bool use_camel_case = (wp->w_s->b_p_spo_flags & SPO_CAMEL) != 0; + bool use_camel_case = (wp->w_s->b_p_spo_flags & kOptSpoFlagCamel) != 0; bool is_camel_case = false; matchinf_T mi; // Most things are put in "mi" so that it can be passed to functions quickly. @@ -1407,7 +1407,7 @@ size_t spell_move_to(win_T *wp, int dir, smt_T behaviour, bool curline, hlf_T *a : p - buf) > wp->w_cursor.col)) { colnr_T col = (colnr_T)(p - buf); - bool no_plain_buffer = (wp->w_s->b_p_spo_flags & SPO_NPBUFFER) != 0; + bool no_plain_buffer = (wp->w_s->b_p_spo_flags & kOptSpoFlagNoplainbuffer) != 0; bool can_spell = !no_plain_buffer; switch (decor_spell_nav_col(wp, lnum, &decor_lnum, col)) { case kTrue: @@ -3141,7 +3141,7 @@ static void spell_soundfold_wsal(slang_T *slang, const char *inword, char *res) c = *ws; } if (strstr(s, "^^") != NULL) { - if (c != NUL) { + if (c != NUL && reslen < MAXWLEN) { wres[reslen++] = c; } memmove(word, word + i + 1, sizeof(int) * (size_t)(wordlen - (i + 1) + 1)); |