aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/drawline.c1
-rw-r--r--test/functional/ui/decorations_spec.lua32
2 files changed, 33 insertions, 0 deletions
diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c
index abc27c1eda..ad08fd0e10 100644
--- a/src/nvim/drawline.c
+++ b/src/nvim/drawline.c
@@ -1799,6 +1799,7 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool nochange,
area_attr = 0;
extmark_attr = 0;
virt_inline_i++;
+ n_skip = 0;
// If the text didn't reach until the first window
// column we need to skip cells.
if (skip_cells > 0) {
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index 68a5bb5f9a..f67c4be419 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -1983,6 +1983,38 @@ bbbbbbb]])
|
]]}
end)
+
+ it('correctly draws when overflowing virtual text is followed by tab with no wrap', function()
+ command('set nowrap')
+ feed('i<TAB>test<ESC>')
+ meths.buf_set_extmark(
+ 0,
+ ns,
+ 0,
+ 0,
+ { virt_text = { { string.rep('a', 60), 'Special' } }, virt_text_pos = 'inline' }
+ )
+ feed('0')
+ screen:expect({
+ grid = [[
+ {28:aaaaaaaaaaaaaaaaaaaaaa} ^ test |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ |
+ ]],
+ })
+ end)
end)
describe('decorations: virtual lines', function()