aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/decorations_spec.lua
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-02-01 18:52:12 +0100
committerGitHub <noreply@github.com>2024-02-01 18:52:12 +0100
commit05fd70f19b39519985000141d022971e37d66189 (patch)
treef067014a7ba6cd6bf781ed9f65ce74e2539b01d9 /test/functional/ui/decorations_spec.lua
parent4c91194611086916c833d61e28e2f5e689316e83 (diff)
parentb50fdcba4a1dadda5db7cfb527471b9956768ac2 (diff)
downloadrneovim-05fd70f19b39519985000141d022971e37d66189.tar.gz
rneovim-05fd70f19b39519985000141d022971e37d66189.tar.bz2
rneovim-05fd70f19b39519985000141d022971e37d66189.zip
Merge pull request #27122 from luukvbaal/signcol
fix(column): clear "b_signcols" before moving saved marks
Diffstat (limited to 'test/functional/ui/decorations_spec.lua')
-rw-r--r--test/functional/ui/decorations_spec.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index cb804f056d..a4c024b526 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -5099,6 +5099,33 @@ l5
]]}
end)
+ it('correct width with moved marks before undo savepos', function()
+ screen:try_resize(20, 4)
+ insert(example_test3)
+ feed('gg')
+ exec_lua([[
+ local ns = vim.api.nvim_create_namespace('')
+ vim.api.nvim_buf_set_extmark(0, ns, 0, 0, { sign_text = 'S1' })
+ vim.api.nvim_buf_set_extmark(0, ns, 1, 0, { sign_text = 'S2' })
+ local s3 = vim.api.nvim_buf_set_extmark(0, ns, 2, 0, { sign_text = 'S3' })
+ local s4 = vim.api.nvim_buf_set_extmark(0, ns, 2, 0, { sign_text = 'S4' })
+ vim.schedule(function()
+ vim.cmd('silent d3')
+ vim.api.nvim_buf_set_extmark(0, ns, 2, 0, { id = s3, sign_text = 'S3' })
+ vim.api.nvim_buf_set_extmark(0, ns, 2, 0, { id = s4, sign_text = 'S4' })
+ vim.cmd('silent undo')
+ vim.api.nvim_buf_del_extmark(0, ns, s3)
+ end)
+ ]])
+
+ screen:expect{grid=[[
+ S1^l1 |
+ S2l2 |
+ S4l3 |
+ |
+ ]]}
+ end)
+
it('no crash with sign after many marks #27137', function()
screen:try_resize(20, 4)
insert('a')