Repository navigation
core: report the release of a tracked click on a prompt - #14710
Merged
Merged
Conversation
When the cursor is at a prompt that declared click_events=1 or cl=, a left release ran the prompt click before the mouse report. Under mouse tracking the press had already been reported, so the release was replaced by a synthetic SGR press or arrow keys. Ghostty's own shell integration hits this whenever a widget runs a mouse-tracking program from the prompt, such as fzf's Ctrl-R binding. The selection gesture is reset when a press is reported, so a zero click count on release means the press reached the program. Skip the prompt click then and report the release too. Shift+click under tracking still records a gesture and moves the cursor. Signed-off-by: Fredrik Fornwall <fredrik@fornwall.net>
mitchellh
approved these changes
Oct 15, 2026
5 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the cursor is at a prompt with click-to-move (OSC 133 click_events or cl=) and a program started from that prompt tracks the mouse, a left click reaches the program as a press without a release (the release is instead replaced by the prompt click).
A release whose press went to the program now goes to the program too, instead of becoming a prompt click.
Steps to reproduce:
source <(fzf --zsh)under zsh. Tested with zsh; bash uses the samecl=linemark and fish usesclick_events=1, so both should take the same path.Ctrl-Rto open the fzf history search.Results:
AI disclosure: Created with opus 5.5 through claude code. Reviewed and tested by me.