diff options
author | luukvbaal <luukvbaal@gmail.com> | 2024-06-19 00:00:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-19 06:00:39 +0800 |
commit | 102971a396724594a00f7e31cbeec55cdb536f17 (patch) | |
tree | 7cef292406260647b06e8ef6f34211b8802b1c67 /src | |
parent | 2791fd4e1722fd45fa0f4261879046e8d397645a (diff) | |
download | rneovim-102971a396724594a00f7e31cbeec55cdb536f17.tar.gz rneovim-102971a396724594a00f7e31cbeec55cdb536f17.tar.bz2 rneovim-102971a396724594a00f7e31cbeec55cdb536f17.zip |
fix(mouse): early return when clicking in padded 'statuscolumn' (#29394)
Problem: Hit assert when clicking inside a padded 'statuscolumn' that
is padded beyond the length of the allocated click_defs.
Solution: Still consider this a "in_statuscol" click, but return early
when about to execute the click func.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/mouse.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/mouse.c b/src/nvim/mouse.c index f393b0fd0f..bd245bdca3 100644 --- a/src/nvim/mouse.c +++ b/src/nvim/mouse.c @@ -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) { |