fix(extmarks): make virt_lines always start at 0 virtcol

This commit is contained in:
zeertzjq 2022-09-25 21:38:46 +08:00
parent 91e912f8d4
commit fded344f38
2 changed files with 33 additions and 1 deletions

View File

@ -2607,7 +2607,7 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool nochange,
assert(i >= 0);
int offset = kv_A(virt_lines, i).left_col ? 0 : win_col_offset;
draw_virt_text_item(buf, offset, kv_A(virt_lines, i).line,
kHlModeReplace, grid->cols, offset);
kHlModeReplace, grid->cols, 0);
}
} else {
draw_virt_text(wp, buf, win_col_offset, &draw_col, grid->cols, row);

View File

@ -1550,6 +1550,38 @@ if (h->n_buckets < new_n_buckets) { // expand
} |
|
]]}
command 'set number'
screen:expect{grid=[[
{9: 1 }^if (h->n_buckets < new_n_buckets) { // expand |
{9: 2 } khkey_t *new_keys = (khkey_t *)krealloc((voi|
{9: }d *)h->keys, new_n_buckets * sizeof(khkey_t));|
{9: }{1:>>}{2: very tabby}text with tabs |
{9: 3 } h->keys = new_keys; |
{9: 4 } if (kh_is_map && val_size) { |
{9: 5 } char *new_vals = krealloc( h->vals_buf, ne|
{9: }w_n_buckets * val_size); |
{9: 6 } h->vals_buf = new_vals; |
{9: 7 } } |
{9: 8 }} |
|
]]}
command 'set tabstop&'
screen:expect{grid=[[
{9: 1 }^if (h->n_buckets < new_n_buckets) { // expand |
{9: 2 } khkey_t *new_keys = (khkey_t *)krealloc((voi|
{9: }d *)h->keys, new_n_buckets * sizeof(khkey_t));|
{9: }{1:>>}{2: very tabby}text with tabs |
{9: 3 } h->keys = new_keys; |
{9: 4 } if (kh_is_map && val_size) { |
{9: 5 } char *new_vals = krealloc( h->vals_buf, ne|
{9: }w_n_buckets * val_size); |
{9: 6 } h->vals_buf = new_vals; |
{9: 7 } } |
{9: 8 }} |
|
]]}
end)
end)