diff options
| author | Othavio Quiliao <othavioaqa@gmail.com> | 2026-04-09 16:06:27 -0300 |
|---|---|---|
| committer | Othavio Quiliao <othavioaqa@gmail.com> | 2026-04-09 16:06:27 -0300 |
| commit | 42fa2648ee4b98775eee5df3ccf8ecdcbec88fb3 (patch) | |
| tree | 7375cd766497d614156667b2d00d25b36c47dc95 /src/selection.rs | |
| parent | 5e711fb7d3b6039afa7d3683d9ef0504f2de9cb2 (diff) | |
fix: always open pane context menu on right-click
The Down(Right) handler forwarded the click to the inner pane runtime
when mouse reporting was active, then early-returned before creating the
context menu state. For panes running a TUI that enables mouse reporting
(e.g. Claude Code), right-clicking focused the pane but never opened the
herdr context menu, even though right-click on plain shells or Codex
still worked.
Stop forwarding Down(Right) to the pane runtime altogether. Right-click
on a pane now always focuses it and opens the herdr context menu,
matching how terminal emulators like Ghostty, Alacritty, Kitty and iTerm2
treat right-click. This means the previous context menu actions
(close pane, split, fullscreen, etc.) now also reach the intended pane
via focus_pane before the menu is displayed.
Remove Up(Right) and Drag(Right) from the middle/right forward branch so
the inner TUI never sees an Up or Drag without a matching Down. Middle
button forwarding is preserved because it is still used for paste in
many terminal protocols.
Tighten the existing right-click regression test with assertions that
Mode::ContextMenu is entered and context_menu is populated. Without
these extra checks the earlier version of the test only verified focus
and failed to catch this exact bug.
Diffstat (limited to 'src/selection.rs')
0 files changed, 0 insertions, 0 deletions
