Ctrl+Click fails to open file link with an in-terminal editor #12955
Replies: 1 comment 2 replies
-
|
when a program captures the mouse (or in the alternate screen) you must press shift for url clicking. Why? Because programs which capture the mouse can have their own keybinds for ctrl+click, when pressing shift ghostty overrides the mouse capture for itself. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Description
I set
nvimas my default editor.In the terminal I create a file
~/bar.txtand print a link to it withprintf '\e]8;;file://%s/bar.txt\e\\Link to my file\e]8;;\e\\\n' $HOME.Using Ctrl+Click on the printed link does nothing instead of opening the file.
Expected Behavior
Nvim is opened to edit the file.
Actual Behavior
Nothing happens after Ctrl+Clicking on the file, no program is opened.
For reference running
xdg-open "file://$HOME/bar.txt"opens nvim in the same active window to open the file. Closing nvim returns to the prompt.I expect Ctrl+Click give the same result as running
xdg-openon the link as per the documentation https://ghostty.org/docs/config/reference#link.For a comparison: When wrapping nvim to always use a new window, I get consistent and expected results.
Use
nvim-new-term.desktop(See Additional Relevant Configuration) as the default handler fortext/plaininstead and observe:Clicking on the link or using
xdg-openboth create a new ghostty window running nvim and the file opened. Closing nvim then always closes the new window.Reproduction Steps
neovimis installed~/.local/share/applications/nvim-same-term.desktop. See Additional Relevant Configurationtext/plainwithxdg-mime default nvim-same-term.desktop text/plainecho foo > ~/bar.txtxdg-mime query filetype ~/bar.txtreturntext/plainprintf '\e]8;;file://%s/bar.txt\e\\Link to my file\e]8;;\e\\\n' $HOMEGhostty Logs
Ghostty Version
OS Version Information
NixOS 26.11 (Zokor) x86_64
(Linux only) Display Server
Wayland
(Linux only) Desktop Environment/Window Manager
Hyprland 0.55.2
Minimal Ghostty Configuration
Additional Relevant Configuration
File:
~/.local/share/applications/nvim-new-term.desktopFile:
~/.local/share/applications/nvim-same-term.desktopFile
~/.config/mimeapps.listI acknowledge that:
```) on separate lines.Beta Was this translation helpful? Give feedback.
All reactions