diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2018-06-29 13:35:42 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2019-11-23 14:50:31 +0100 |
commit | bdebe8516c90839930acbfe3c6f1e354ee56df3f (patch) | |
tree | a4eee6986b0e64cf37e364f8f449978c29db6848 /src/nvim/mark_extended.c | |
parent | d5f14b8372b3c8d441187eea659156534cb4c9ba (diff) | |
download | rneovim-bdebe8516c90839930acbfe3c6f1e354ee56df3f.tar.gz rneovim-bdebe8516c90839930acbfe3c6f1e354ee56df3f.tar.bz2 rneovim-bdebe8516c90839930acbfe3c6f1e354ee56df3f.zip |
bufhl: use extmark column adjustment for bufhl
NB: this is not the final implementation. Bufhl should be made a
part of the extmark tree, so that "start" adjustment just works
automatically. But "stop" will still need some ad-hoc trickery,
until extended marks natively support ranges (hopefully sooner than
forever).
Diffstat (limited to 'src/nvim/mark_extended.c')
-rw-r--r-- | src/nvim/mark_extended.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/mark_extended.c b/src/nvim/mark_extended.c index 01745f484d..91c2f919ce 100644 --- a/src/nvim/mark_extended.c +++ b/src/nvim/mark_extended.c @@ -910,6 +910,9 @@ void extmark_col_adjust(buf_T *buf, linenr_T lnum, bool marks_moved = extmark_col_adjust_impl(buf, lnum, mincol, lnum_amount, false, col_amount); + marks_moved |= bufhl_mark_col_adjust(buf, lnum, mincol, + lnum_amount, col_amount); + if (undo == kExtmarkUndo && marks_moved) { u_extmark_col_adjust(buf, lnum, mincol, lnum_amount, col_amount); } @@ -938,6 +941,7 @@ void extmark_col_adjust_delete(buf_T *buf, linenr_T lnum, marks_moved = extmark_col_adjust_impl(buf, lnum, mincol, 0, true, (long)endcol); + marks_moved |= bufhl_mark_col_adjust(buf, lnum, endcol, 0, mincol-(endcol+1)); // Deletes at the end of the line have different behaviour than the normal // case when deleted. // Cleanup any marks that are floating beyond the end of line. |