mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-06-15 08:03:56 +00:00
core: send selection_changed notification
The core had no signal to the apprt when the active selection changed, so a consumer (e.g. a screen reader) kept reading a stale selection until some unrelated query refreshed it. This change adds a payload-less selection_changed action that's fired on a selection state transition. The apprt reads the current selection through the normal read path. This consolidates selection state changes so the notification fires consistently: all sites route through setSelection rather than calling screen.select directly, including the mouse paths that previously bypassed it for clipboard timing. The new setSelectionAndCopy extends setSelection with the additional 'copy_on_select' behavior. On macOS, this posts .ghosttySelectionDidChange, which is debounced before posting a NSAccessibility .selectedTextChanged notification. GTK has no consumer yet and no-ops the action.
This commit is contained in:
@@ -934,6 +934,7 @@ typedef enum {
|
||||
GHOSTTY_ACTION_CONFIG_CHANGE,
|
||||
GHOSTTY_ACTION_CLOSE_WINDOW,
|
||||
GHOSTTY_ACTION_RING_BELL,
|
||||
GHOSTTY_ACTION_SELECTION_CHANGED,
|
||||
GHOSTTY_ACTION_UNDO,
|
||||
GHOSTTY_ACTION_REDO,
|
||||
GHOSTTY_ACTION_CHECK_FOR_UPDATES,
|
||||
|
||||
Reference in New Issue
Block a user