mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 05:05:00 -07:00
Merge pull request #26276 from luukvbaal/decor
refactor(decor): remove sign conditions that are always true
This commit is contained in:
commit
d85e9935f2
@ -725,12 +725,10 @@ void decor_redraw_signs(win_T *wp, buf_T *buf, int row, SignTextAttrs sattrs[],
|
||||
while (marktree_itr_step_overlap(buf->b_marktree, itr, &pair)) {
|
||||
if (!mt_invalid(pair.start) && mt_decor_sign(pair.start)) {
|
||||
DecorSignHighlight *sh = decor_find_sign(mt_decor(pair.start));
|
||||
if (sh) {
|
||||
num_text += (sh->text.ptr != NULL);
|
||||
kv_push(signs, ((SignItem){ sh, pair.start.id }));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while (itr->x) {
|
||||
MTKey mark = marktree_itr_current(itr);
|
||||
@ -739,11 +737,9 @@ void decor_redraw_signs(win_T *wp, buf_T *buf, int row, SignTextAttrs sattrs[],
|
||||
}
|
||||
if (!mt_end(mark) && !mt_invalid(mark) && mt_decor_sign(mark)) {
|
||||
DecorSignHighlight *sh = decor_find_sign(mt_decor(mark));
|
||||
if (sh) {
|
||||
num_text += (sh->text.ptr != NULL);
|
||||
kv_push(signs, ((SignItem){ sh, mark.id }));
|
||||
}
|
||||
}
|
||||
|
||||
marktree_itr_next(buf->b_marktree, itr);
|
||||
}
|
||||
@ -826,11 +822,8 @@ int decor_signcols(buf_T *buf, int row, int end_row, int max)
|
||||
break;
|
||||
}
|
||||
if (!mt_invalid(mark) && !mt_end(mark) && (mark.flags & MT_FLAG_DECOR_SIGNTEXT)) {
|
||||
DecorSignHighlight *sh = decor_find_sign(mt_decor(mark));
|
||||
if (sh && sh->text.ptr) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
marktree_itr_next(buf->b_marktree, itr);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user