refactor(extmarks): some minor internal API changes

extranges and a bunch of other improvements are coming for 0.10
This gets in some minor surrounding API changes to avoid rebase
conflicts until then.

- decorations will be able to be specific to windows
- adjust deletion API to fit with extranges
This commit is contained in:
bfredl
2023-03-16 13:56:05 +01:00
parent 320cb344c1
commit 8021300806
9 changed files with 53 additions and 40 deletions

View File

@@ -1203,7 +1203,7 @@ bool no_spell_checking(win_T *wp)
static void decor_spell_nav_start(win_T *wp)
{
decor_state = (DecorState){ 0 };
decor_redraw_reset(wp->w_buffer, &decor_state);
decor_redraw_reset(wp, &decor_state);
}
static bool decor_spell_nav_col(win_T *wp, linenr_T lnum, linenr_T *decor_lnum, int col,
@@ -1211,10 +1211,10 @@ static bool decor_spell_nav_col(win_T *wp, linenr_T lnum, linenr_T *decor_lnum,
{
if (*decor_lnum != lnum) {
decor_providers_invoke_spell(wp, lnum - 1, col, lnum - 1, -1, decor_error);
decor_redraw_line(wp->w_buffer, lnum - 1, &decor_state);
decor_redraw_line(wp, lnum - 1, &decor_state);
*decor_lnum = lnum;
}
decor_redraw_col(wp->w_buffer, col, col, false, &decor_state);
decor_redraw_col(wp, col, col, false, &decor_state);
return decor_state.spell == kTrue;
}