From 620c8fdfe91a382982fafaa376acd722fe0df051 Mon Sep 17 00:00:00 2001 From: erw7 Date: Wed, 23 Sep 2020 10:33:18 +0900 Subject: extmark: fix decoration ploblems with extmark 54ce101 changed the way undo entries are created when adding decorations. This creates all sorts of problems.This change fixes the problem by reverting to the previous behavior. --- src/nvim/api/buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/api/buffer.c') diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c index e77870dcf3..2eeaeae522 100644 --- a/src/nvim/api/buffer.c +++ b/src/nvim/api/buffer.c @@ -1534,7 +1534,7 @@ Integer nvim_buf_add_highlight(Buffer buffer, ns_id = extmark_set(buf, ns_id, 0, (int)line, (colnr_T)col_start, end_line, (colnr_T)col_end, - decoration_hl(hl_id), kExtmarkUndo); + decoration_hl(hl_id), kExtmarkNoUndo); return src_id; } @@ -1664,7 +1664,7 @@ Integer nvim_buf_set_virtual_text(Buffer buffer, Decoration *decor = xcalloc(1, sizeof(*decor)); decor->virt_text = virt_text; - extmark_set(buf, ns_id, 0, (int)line, 0, -1, -1, decor, kExtmarkUndo); + extmark_set(buf, ns_id, 0, (int)line, 0, -1, -1, decor, kExtmarkNoUndo); return src_id; } -- cgit From f1b39f91a5be7f3bf61b0e0d129dce49d51ff360 Mon Sep 17 00:00:00 2001 From: erw7 Date: Fri, 25 Sep 2020 09:26:44 +0900 Subject: extmark: Change nvim_buf_set_extmark to not create undo data --- src/nvim/api/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/api/buffer.c') diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c index 2eeaeae522..174f6e94a9 100644 --- a/src/nvim/api/buffer.c +++ b/src/nvim/api/buffer.c @@ -1420,7 +1420,7 @@ Integer nvim_buf_set_extmark(Buffer buffer, Integer ns_id, } id = extmark_set(buf, (uint64_t)ns_id, id, - (int)line, (colnr_T)col, line2, col2, decor, kExtmarkUndo); + (int)line, (colnr_T)col, line2, col2, decor, kExtmarkNoUndo); return (Integer)id; -- cgit