diff options
Diffstat (limited to 'src/nvim/extmark.c')
-rw-r--r-- | src/nvim/extmark.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/nvim/extmark.c b/src/nvim/extmark.c index 8e780f4aaa..3e059bcc6c 100644 --- a/src/nvim/extmark.c +++ b/src/nvim/extmark.c @@ -29,20 +29,21 @@ // code for redrawing the line with the deleted decoration. #include <assert.h> +#include <sys/types.h> -#include "nvim/api/extmark.h" #include "nvim/buffer.h" +#include "nvim/buffer_defs.h" #include "nvim/buffer_updates.h" -#include "nvim/charset.h" #include "nvim/decoration.h" #include "nvim/extmark.h" +#include "nvim/extmark_defs.h" #include "nvim/globals.h" -#include "nvim/lib/kbtree.h" #include "nvim/map.h" +#include "nvim/marktree.h" #include "nvim/memline.h" +#include "nvim/memory.h" #include "nvim/pos.h" #include "nvim/undo.h" -#include "nvim/vim.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "extmark.c.generated.h" @@ -70,7 +71,8 @@ void extmark_set(buf_T *buf, uint32_t ns_id, uint32_t *idp, int row, colnr_T col || kv_size(decor->virt_lines) || decor->conceal || decor_has_sign(decor) - || decor->ui_watched) { + || decor->ui_watched + || decor->spell != kNone) { decor_full = true; decor = xmemdup(decor, sizeof *decor); } @@ -111,6 +113,7 @@ void extmark_set(buf_T *buf, uint32_t ns_id, uint32_t *idp, int row, colnr_T col marktree_revise(buf->b_marktree, itr, decor_level, old_mark); goto revised; } + decor_remove(buf, old_mark.pos.row, old_mark.pos.row, old_mark.decor_full); marktree_del_itr(buf->b_marktree, itr, false); } } else { |