mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 02:16:31 +00:00
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).
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user