fix(ui): fixes incorrect rendering when virtual text is not visable and nowrap

This commit is contained in:
Ibby
2023-04-03 01:05:08 +10:00
committed by bfredl
parent be273c3a23
commit 1936285d98
2 changed files with 31 additions and 4 deletions

View File

@@ -1743,12 +1743,12 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool nochange,
DecorState *state = &decor_state;
for (size_t i = 0; i < kv_size(state->active); i++) {
DecorRange *item = &kv_A(state->active, i);
if (!(item->start_row == state->row
&& kv_size(item->decor.virt_text)
&& item->decor.virt_text_pos == kVTInline)) {
if (item->start_row != state->row
|| !kv_size(item->decor.virt_text)
|| item->decor.virt_text_pos != kVTInline) {
continue;
}
if (item->win_col >= -1 && item->start_col <= v) {
if (item->win_col >= -1 && item->start_col == v) {
virt_inline = item->decor.virt_text;
virt_inline_i = 0;
item->win_col = -2;