diff options
Diffstat (limited to 'src/nvim/extmark.c')
-rw-r--r-- | src/nvim/extmark.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/nvim/extmark.c b/src/nvim/extmark.c index 1639f72990..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 { @@ -510,11 +513,11 @@ void extmark_adjust(buf_T *buf, linenr_T line1, linenr_T line2, linenr_T amount, bcount_t old_byte = 0, new_byte = 0; int old_row, new_row; if (amount == MAXLNUM) { - old_row = (int)(line2 - line1 + 1); + old_row = line2 - line1 + 1; // TODO(bfredl): ej kasta? old_byte = (bcount_t)buf->deleted_bytes2; - new_row = (int)(amount_after + old_row); + new_row = amount_after + old_row; } else { // A region is either deleted (amount == MAXLNUM) or // added (line2 == MAXLNUM). The only other case is :move |