terminal: dispatch OSC 5522 as a kitty_clipboard stream action, unhandled

This commit is contained in:
Mitchell Hashimoto
2026-08-21 12:19:14 -07:00
parent 07c6fc21ba
commit bcf44b40e6
3 changed files with 11 additions and 1 deletions

View File

@@ -128,6 +128,7 @@ pub const Action = union(Key) {
kitty_color_report: kitty.color.OSC,
color_operation: ColorOperation,
semantic_prompt: SemanticPrompt,
kitty_clipboard: KittyClipboard,
pub const Key = lib.Enum(
lib.target,
@@ -227,6 +228,7 @@ pub const Action = union(Key) {
"kitty_color_report",
"color_operation",
"semantic_prompt",
"kitty_clipboard",
},
);
@@ -444,6 +446,8 @@ pub const Action = union(Key) {
};
pub const SemanticPrompt = osc.Command.SemanticPrompt;
pub const KittyClipboard = osc.Command.KittyClipboardProtocol;
};
/// Returns a type that can process a stream of tty control characters.
@@ -2551,6 +2555,10 @@ pub fn Stream(comptime H: type) type {
self.handler.vt(.progress_report, v);
},
.kitty_clipboard_protocol => |v| {
self.handler.vt(.kitty_clipboard, v);
},
.conemu_sleep,
.conemu_show_message_box,
.conemu_change_tab_title,
@@ -2561,7 +2569,6 @@ pub fn Stream(comptime H: type) type {
.conemu_output_environment_variable,
.conemu_run_process,
.kitty_text_sizing,
.kitty_clipboard_protocol,
.kitty_dnd_protocol,
.context_signal,
=> {

View File

@@ -398,6 +398,8 @@ pub const Handler = struct {
// Have no terminal-modifying effect
.title_push,
.title_pop,
// Unimplemented; the sequence is consumed and ignored.
.kitty_clipboard,
=> {},
}
}

View File

@@ -356,6 +356,7 @@ pub const StreamHandler = struct {
// Unimplemented
.title_push,
.title_pop,
.kitty_clipboard,
=> {},
}
}