fix(ui): apply 'pumborder' to mouse menu, fix overflow #36193

Problem:
Mouse popup menus (right-click context menus) do not respect the
'pumborder' option and could overflow screen boundaries when borders
were enabled near the edge.

Solution:
- Remove the mouse menu exclusion from border rendering.
- Add boundary check to shift menu left when border would exceed screen
  width, ensuring complete visibility of menu content and borders.
This commit is contained in:
glepnir
2026-03-20 01:11:35 +08:00
committed by GitHub
parent 4b0700c618
commit 531442ddd8
5 changed files with 169 additions and 17 deletions

View File

@@ -6699,6 +6699,9 @@ local options = {
Defines the default border style of popupmenu windows. See 'winborder' for
valid values. |hl-PmenuBorder| is used for highlighting the border, and when
style is "shadow" the |hl-PmenuShadow| and |hl-PmenuShadowThrough| groups are used.
This option also applies to mouse popup menus when 'mousemodel' is set to
"popup" or "popup_setpos", which will display borders using the same style.
]=],
short_desc = N_('border of popupmenu'),
type = 'string',