aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/decoration.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/decoration.c')
-rw-r--r--src/nvim/decoration.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/nvim/decoration.c b/src/nvim/decoration.c
index 95502e176c..e4828bcc31 100644
--- a/src/nvim/decoration.c
+++ b/src/nvim/decoration.c
@@ -10,6 +10,7 @@
#include "nvim/ascii_defs.h"
#include "nvim/buffer.h"
#include "nvim/buffer_defs.h"
+#include "nvim/change.h"
#include "nvim/decoration.h"
#include "nvim/drawscreen.h"
#include "nvim/extmark.h"
@@ -91,15 +92,18 @@ void bufhl_add_hl_pos_offset(buf_T *buf, int src_id, int hl_id, lpos_T pos_start
}
}
-void decor_redraw(buf_T *buf, int row1, int row2, DecorInline decor)
+void decor_redraw(buf_T *buf, int row1, int row2, int col1, DecorInline decor)
{
if (decor.ext) {
DecorVirtText *vt = decor.data.ext.vt;
while (vt) {
bool below = (vt->flags & kVTIsLines) && !(vt->flags & kVTLinesAbove);
- redraw_buf_line_later(buf, row1 + 1 + below, true);
+ linenr_T vt_lnum = row1 + 1 + below;
+ redraw_buf_line_later(buf, vt_lnum, true);
if (vt->flags & kVTIsLines || vt->pos == kVPosInline) {
- changed_line_display_buf(buf);
+ // changed_lines_redraw_buf(buf, vt_lnum, vt_lnum + 1, 0);
+ colnr_T vt_col = vt->flags & kVTIsLines ? 0 : col1;
+ changed_lines_invalidate_buf(buf, vt_lnum, vt_col, vt_lnum + 1, 0);
}
vt = vt->next;
}
@@ -190,9 +194,9 @@ void buf_put_decor_sh(buf_T *buf, DecorSignHighlight *sh, int row1, int row2)
}
}
-void buf_decor_remove(buf_T *buf, int row1, int row2, DecorInline decor, bool free)
+void buf_decor_remove(buf_T *buf, int row1, int row2, int col1, DecorInline decor, bool free)
{
- decor_redraw(buf, row1, row2, decor);
+ decor_redraw(buf, row1, row2, col1, decor);
if (decor.ext) {
uint32_t idx = decor.data.ext.sh_idx;
while (idx != DECOR_ID_INVALID) {