diff options
author | Famiu Haque <famiuhaque@proton.me> | 2024-11-23 14:22:06 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-23 08:22:06 +0000 |
commit | 8516c2dc1f301c439695629fff771227dbe00d30 (patch) | |
tree | 5e052ad234f99cdbfce89b03ba71796a8cd274ef /src/nvim/spell.c | |
parent | 9a681ad09e2add96d47bf3f39cca8029f3bf09df (diff) | |
download | rneovim-8516c2dc1f301c439695629fff771227dbe00d30.tar.gz rneovim-8516c2dc1f301c439695629fff771227dbe00d30.tar.bz2 rneovim-8516c2dc1f301c439695629fff771227dbe00d30.zip |
refactor(options): autogenerate valid values and flag enums for options (#31089)
Problem: Option metadata like list of valid values for an option and
option flags are not listed in the `options.lua` file and are instead
manually defined in C, which means option metadata is split between
several places.
Solution: Put metadata such as list of valid values for an option and
option flags in `options.lua`, and autogenerate the corresponding C
variables and enums.
Supersedes #28659
Co-authored-by: glepnir <glephunter@gmail.com>
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r-- | src/nvim/spell.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c index a0fdd46b04..00e977710f 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: |