ghosttyTerminalNotifySelectionChange<SelectionT> function
- required SelectionT? previousSelection,
- required SelectionT? nextSelection,
- required String resolveText(
- SelectionT selection
- required void onSelectionChanged(
- SelectionT? selection
- required void onSelectionContentChanged(
- GhosttyTerminalSelectionContent<
SelectionT> ? content
- GhosttyTerminalSelectionContent<
Emits shared terminal selection callbacks and derived content payloads.
Implementation
void ghosttyTerminalNotifySelectionChange<SelectionT>({
required SelectionT? previousSelection,
required SelectionT? nextSelection,
required String Function(SelectionT selection) resolveText,
required void Function(SelectionT? selection)? onSelectionChanged,
required void Function(GhosttyTerminalSelectionContent<SelectionT>? content)?
onSelectionContentChanged,
}) {
if (previousSelection == nextSelection) {
return;
}
onSelectionChanged?.call(nextSelection);
ghosttyTerminalNotifySelectionContent<SelectionT>(
selection: nextSelection,
resolveText: resolveText,
onSelectionContentChanged: onSelectionContentChanged,
);
}