mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
Merge pull request #29399 from neovim/backport-29394-to-release-0.10
fix(mouse): early return when clicking in padded 'statuscolumn'
This commit is contained in:
@ -688,6 +688,9 @@ popupexit:
|
||||
if (in_statuscol && wp->w_p_rl) {
|
||||
click_col = wp->w_width_inner - click_col - 1;
|
||||
}
|
||||
if (in_statuscol && click_col >= (int)wp->w_statuscol_click_defs_size) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (click_defs != NULL) {
|
||||
switch (click_defs[click_col].type) {
|
||||
|
@ -91,6 +91,10 @@ describe('statuscolumn', function()
|
||||
{8:2 }aaaaa |
|
||||
|
|
||||
]])
|
||||
-- Doesn't crash when clicking inside padded area without click_defs
|
||||
command('set numberwidth=10')
|
||||
api.nvim_input_mouse('left', 'press', '', 0, 0, 5)
|
||||
assert_alive()
|
||||
end)
|
||||
|
||||
it("works with 'number' and 'relativenumber'", function()
|
||||
|
Reference in New Issue
Block a user