fix: use cmd-click for macos pane links

refs #307
This commit is contained in:
Ogulcan Celik 2026-06-08 02:22:32 +03:00
parent fb56e64537
commit e7ba8da29a
2 changed files with 22 additions and 1 deletions

View File

@ -3,6 +3,7 @@
## Unreleased
### Fixed
- Native pane URL clicks now use Cmd-click on macOS and Ctrl-click on other platforms.
- Windows beta installs now default to the preview channel, persist `channel = "preview"` during install, reject switching to stable until stable Windows builds exist, and update through the Windows installer without probing unsupported live-handoff/session status paths.
- Pane output now renders flag emoji and other multi-codepoint grapheme clusters as complete symbols instead of blank cells. (#243)
- Starting Herdr with no restored workspaces, or closing the last workspace, now opens a default workspace instead of leaving the client on an empty screen where direct keybindings such as `cmd+n` were shown but ignored. (#366)

View File

@ -23,6 +23,26 @@ enum WheelRouting {
const WORKSPACE_DRAG_THRESHOLD: u16 = 1;
const TAB_DRAG_THRESHOLD: u16 = 1;
#[cfg(target_os = "macos")]
fn modified_url_click_modifier() -> KeyModifiers {
KeyModifiers::SUPER
}
#[cfg(not(target_os = "macos"))]
fn modified_url_click_modifier() -> KeyModifiers {
KeyModifiers::CONTROL
}
#[cfg(test)]
#[test]
fn modified_url_click_modifier_matches_platform_primary_modifier() {
#[cfg(target_os = "macos")]
assert_eq!(modified_url_click_modifier(), KeyModifiers::SUPER);
#[cfg(not(target_os = "macos"))]
assert_eq!(modified_url_click_modifier(), KeyModifiers::CONTROL);
}
mod copy_mode;
mod modal;
mod mouse;
@ -262,7 +282,7 @@ impl App {
fn handle_modified_url_click(&mut self, mouse: MouseEvent) -> bool {
if self.state.mode != Mode::Terminal
|| !matches!(mouse.kind, MouseEventKind::Down(MouseButton::Left))
|| !mouse.modifiers.contains(KeyModifiers::CONTROL)
|| !mouse.modifiers.contains(modified_url_click_modifier())
{
return false;
}