mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00
This reverts commit 15e77a56b7
.
Subpriorities were added in https://github.com/neovim/neovim/pull/27131
as a mechanism for enforcing query order when using iter_matches in the
Tree-sitter highlighter. However, iter_matches proved to have too many
complications to use in the highlighter so we eventually reverted back
to using iter_captures (https://github.com/neovim/neovim/pull/27901).
Thus, subpriorities are no longer needed and can be removed.
This commit is contained in:
@@ -454,21 +454,18 @@ static void decor_range_add_from_inline(DecorState *state, int start_row, int st
|
||||
if (decor.ext) {
|
||||
DecorVirtText *vt = decor.data.ext.vt;
|
||||
while (vt) {
|
||||
decor_range_add_virt(state, start_row, start_col, end_row, end_col, vt, owned,
|
||||
DECOR_PRIORITY_BASE);
|
||||
decor_range_add_virt(state, start_row, start_col, end_row, end_col, vt, owned);
|
||||
vt = vt->next;
|
||||
}
|
||||
uint32_t idx = decor.data.ext.sh_idx;
|
||||
while (idx != DECOR_ID_INVALID) {
|
||||
DecorSignHighlight *sh = &kv_A(decor_items, idx);
|
||||
decor_range_add_sh(state, start_row, start_col, end_row, end_col, sh, owned, ns, mark_id,
|
||||
DECOR_PRIORITY_BASE);
|
||||
decor_range_add_sh(state, start_row, start_col, end_row, end_col, sh, owned, ns, mark_id);
|
||||
idx = sh->next;
|
||||
}
|
||||
} else {
|
||||
DecorSignHighlight sh = decor_sh_from_inline(decor.data.hl);
|
||||
decor_range_add_sh(state, start_row, start_col, end_row, end_col, &sh, owned, ns, mark_id,
|
||||
DECOR_PRIORITY_BASE);
|
||||
decor_range_add_sh(state, start_row, start_col, end_row, end_col, &sh, owned, ns, mark_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -478,8 +475,7 @@ static void decor_range_insert(DecorState *state, DecorRange range)
|
||||
size_t index;
|
||||
for (index = kv_size(state->active) - 1; index > 0; index--) {
|
||||
DecorRange item = kv_A(state->active, index - 1);
|
||||
if ((item.priority < range.priority)
|
||||
|| ((item.priority == range.priority) && (item.subpriority <= range.subpriority))) {
|
||||
if (item.priority <= range.priority) {
|
||||
break;
|
||||
}
|
||||
kv_A(state->active, index) = kv_A(state->active, index - 1);
|
||||
@@ -488,7 +484,7 @@ static void decor_range_insert(DecorState *state, DecorRange range)
|
||||
}
|
||||
|
||||
void decor_range_add_virt(DecorState *state, int start_row, int start_col, int end_row, int end_col,
|
||||
DecorVirtText *vt, bool owned, DecorPriority subpriority)
|
||||
DecorVirtText *vt, bool owned)
|
||||
{
|
||||
bool is_lines = vt->flags & kVTIsLines;
|
||||
DecorRange range = {
|
||||
@@ -498,15 +494,13 @@ void decor_range_add_virt(DecorState *state, int start_row, int start_col, int e
|
||||
.attr_id = 0,
|
||||
.owned = owned,
|
||||
.priority = vt->priority,
|
||||
.subpriority = subpriority,
|
||||
.draw_col = -10,
|
||||
};
|
||||
decor_range_insert(state, range);
|
||||
}
|
||||
|
||||
void decor_range_add_sh(DecorState *state, int start_row, int start_col, int end_row, int end_col,
|
||||
DecorSignHighlight *sh, bool owned, uint32_t ns, uint32_t mark_id,
|
||||
DecorPriority subpriority)
|
||||
DecorSignHighlight *sh, bool owned, uint32_t ns, uint32_t mark_id)
|
||||
{
|
||||
if (sh->flags & kSHIsSign) {
|
||||
return;
|
||||
@@ -519,7 +513,6 @@ void decor_range_add_sh(DecorState *state, int start_row, int start_col, int end
|
||||
.attr_id = 0,
|
||||
.owned = owned,
|
||||
.priority = sh->priority,
|
||||
.subpriority = subpriority,
|
||||
.draw_col = -10,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user