mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 10:56:31 +00:00
fix(mouse): mouseclick after conceal_lines is miscalculated #33451
Problem: Computed buffer line for mouse position does not take into
account concealed lines on the reached row.
Solution: Adjust for concealed lines at the end of the loop computing
the buffer position.
(cherry picked from commit 2f8fb4f28a
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
8aa49a8e9b
commit
526444c4ff
@@ -2082,4 +2082,12 @@ describe('ui/mouse/input', function()
|
||||
feed('<Down><Down><CR>')
|
||||
eq('bar', api.nvim_get_var('menustr'))
|
||||
end)
|
||||
|
||||
it('below a concealed line #33450', function()
|
||||
api.nvim_set_option_value('conceallevel', 2, {})
|
||||
api.nvim_buf_set_extmark(0, api.nvim_create_namespace(''), 1, 0, { conceal_lines = '' })
|
||||
api.nvim_input_mouse('right', 'press', '', 0, 1, 0)
|
||||
api.nvim_input_mouse('right', 'release', '', 0, 1, 0)
|
||||
eq(3, fn.line('.'))
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user