aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/extmark.c
diff options
context:
space:
mode:
authorThomas Vigouroux <thomas.vigouroux@protonmail.com>2022-09-13 09:44:24 +0200
committerLewis Russell <lewis6991@gmail.com>2022-11-12 10:19:01 +0000
commit7e6d785d19926714615758e75c4d43e856d13a6f (patch)
tree4fdd44a500626fd1950cd1c85b30bf370b26b26a /src/nvim/api/extmark.c
parent7335a67b5754255f0e892303a0f4e3521035e7d8 (diff)
downloadrneovim-7e6d785d19926714615758e75c4d43e856d13a6f.tar.gz
rneovim-7e6d785d19926714615758e75c4d43e856d13a6f.tar.bz2
rneovim-7e6d785d19926714615758e75c4d43e856d13a6f.zip
feat(extmarks): allow preventing spellchecking with spell = false
Diffstat (limited to 'src/nvim/api/extmark.c')
-rw-r--r--src/nvim/api/extmark.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/nvim/api/extmark.c b/src/nvim/api/extmark.c
index fee6876469..54eb7d9b6b 100644
--- a/src/nvim/api/extmark.c
+++ b/src/nvim/api/extmark.c
@@ -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;
}