aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorIbby <33922797+SleepySwords@users.noreply.github.com>2023-08-26 21:39:05 +1000
committerGitHub <noreply@github.com>2023-08-26 19:39:05 +0800
commit362df0f7938a0e6147ecf886655a0689430d426d (patch)
treed92481ed05770f42eb707a1626f161990c567b80 /test/functional
parent1bdcb9aaf11e914d4c7af14e8e5be4ed3c5798ae (diff)
downloadrneovim-362df0f7938a0e6147ecf886655a0689430d426d.tar.gz
rneovim-362df0f7938a0e6147ecf886655a0689430d426d.tar.bz2
rneovim-362df0f7938a0e6147ecf886655a0689430d426d.zip
fix(extmarks): wrong display when changing text with virt_lines (#24879)
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/ui/decorations_spec.lua57
1 files changed, 57 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index 0a3a2e4e29..36d6fea1de 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -3784,6 +3784,63 @@ if (h->n_buckets < new_n_buckets) { // expand
]]}
end)
+ it('works when using dd or yyp #23915 #23916', function()
+ insert([[
+ line1
+ line2
+ line3
+ line4
+ line5]])
+ meths.buf_set_extmark(0, ns, 0, 0, {virt_lines={{{"foo"}}, {{"bar"}}, {{"baz"}}}})
+ screen:expect{grid=[[
+ line1 |
+ foo |
+ bar |
+ baz |
+ line2 |
+ line3 |
+ line4 |
+ line^5 |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ |
+ ]]}
+
+ feed('gg')
+ feed('dd')
+ screen:expect{grid=[[
+ ^line2 |
+ foo |
+ bar |
+ baz |
+ line3 |
+ line4 |
+ line5 |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ |
+ ]]}
+
+ feed('yyp')
+ screen:expect{grid=[[
+ line2 |
+ foo |
+ bar |
+ baz |
+ ^line2 |
+ line3 |
+ line4 |
+ line5 |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ |
+ ]]}
+ end)
+
end)
describe('decorations: signs', function()