First check if menu visible in `layout_gutter_menu` (#24259)

Also uses an expect instead of unwrap for result of
`render_context_menu`

Release Notes:

- N/A
10792ee0adMichael Sloan committed on 2/6/2025, 6:46:23 AM· committed by GitHubparentc61f12d
1 file changedLine totals unavailable