diff options
author | Lewis Russell <lewis6991@gmail.com> | 2022-11-12 13:14:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-12 13:14:21 +0000 |
commit | 3621c127a841b6aa5dbd12548b25f42534a91a26 (patch) | |
tree | 1bd0e2735446c916d9c3d47be1b88ef16b7642b4 /src/nvim/api/extmark.c | |
parent | 7335a67b5754255f0e892303a0f4e3521035e7d8 (diff) | |
parent | 07eb4263caa671de63186e9bbd650ec4b1fbce1a (diff) | |
download | rneovim-3621c127a841b6aa5dbd12548b25f42534a91a26.tar.gz rneovim-3621c127a841b6aa5dbd12548b25f42534a91a26.tar.bz2 rneovim-3621c127a841b6aa5dbd12548b25f42534a91a26.zip |
Merge pull request #20178 from vigoux/extmark-nospell
feat(extmarks): allow preventing spellchecking with spell = false
Diffstat (limited to 'src/nvim/api/extmark.c')
-rw-r--r-- | src/nvim/api/extmark.c | 8 |
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; } |