diff options
-rw-r--r-- | src/nvim/drawline.c | 2 | ||||
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 32 |
2 files changed, 33 insertions, 1 deletions
diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c index 5c3fa3d3b0..10e1d95730 100644 --- a/src/nvim/drawline.c +++ b/src/nvim/drawline.c @@ -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); diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index eff6fe6d23..44b88d702f 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -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) |