mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00
fix(conceal): check for concealed lines on invalid row (#36084)
Problem: May check for concealed lines on invalid line numbers. Solution: Move checks after line number validation.
This commit is contained in:
@@ -3524,6 +3524,17 @@ describe('extmark decorations', function()
|
||||
eq(5, n.fn.line('w0'))
|
||||
end)
|
||||
|
||||
it('conceal_lines not checking on invalid row #36057', function()
|
||||
exec_lua(function()
|
||||
vim.fn.setline(1, { 'foo', 'bar', 'baz' })
|
||||
vim.api.nvim_command('set conceallevel=3 scrolloff=3')
|
||||
vim.api.nvim_open_win(0, true, { width = 1, height = 1, relative = 'editor', row = 0, col = 0 })
|
||||
vim.api.nvim_buf_set_extmark(0, ns, 1, 0, { conceal_lines = '' })
|
||||
vim.api.nvim__redraw({ flush = true })
|
||||
end)
|
||||
n.assert_alive()
|
||||
end)
|
||||
|
||||
it('redraws the line from which a left gravity mark has moved #27369', function()
|
||||
fn.setline(1, { 'aaa', 'bbb', 'ccc', 'ddd' })
|
||||
api.nvim_buf_set_extmark(0, ns, 1, 0, { virt_text = { { 'foo' } }, right_gravity = false })
|
||||
|
Reference in New Issue
Block a user