feat(extmarks): allow preventing spellchecking with spell = false

This commit is contained in:
Thomas Vigouroux
2022-09-13 09:44:24 +02:00
committed by Lewis Russell
parent 7335a67b57
commit 7e6d785d19
8 changed files with 71 additions and 24 deletions

View File

@@ -721,8 +721,12 @@ Integer nvim_buf_set_extmark(Buffer buffer, Integer ns_id, Integer line, Integer
bool ephemeral = false;
OPTION_TO_BOOL(ephemeral, ephemeral, false);
OPTION_TO_BOOL(decor.spell, spell, false);
if (decor.spell) {
if (opts->spell.type == kObjectTypeNil) {
decor.spell = kNone;
} else {
bool spell = false;
OPTION_TO_BOOL(spell, spell, false);
decor.spell = spell ? kTrue : kFalse;
has_decor = true;
}