mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
fix(decor): check decor kind before accessing union field (#27205)
The data.sh.url field is valid only when item.kind is kDecorKindHighlight. The `if` block just before this line already does that check (as well as checking `active`) so move the access of `data.sh.url` into that block.
This commit is contained in:
parent
e35ae6fbc2
commit
5ca330859c
@ -629,9 +629,9 @@ next_mark:
|
|||||||
} else if (item.data.sh.flags & kSHSpellOff) {
|
} else if (item.data.sh.flags & kSHSpellOff) {
|
||||||
spell = kFalse;
|
spell = kFalse;
|
||||||
}
|
}
|
||||||
}
|
if (item.data.sh.url != NULL) {
|
||||||
if (active && item.data.sh.url != NULL) {
|
attr = hl_add_url(attr, item.data.sh.url);
|
||||||
attr = hl_add_url(attr, item.data.sh.url);
|
}
|
||||||
}
|
}
|
||||||
if (item.start_row == state->row && item.start_col <= col
|
if (item.start_row == state->row && item.start_col <= col
|
||||||
&& decor_virt_pos(&item) && item.draw_col == -10) {
|
&& decor_virt_pos(&item) && item.draw_col == -10) {
|
||||||
|
Loading…
Reference in New Issue
Block a user