summaryrefslogtreecommitdiff
path: root/src/termio/Termio.zig
diff options
context:
space:
mode:
authorJames Holderness <j4_james@hotmail.com>2025-06-29 15:32:17 +0100
committerJames Holderness <j4_james@hotmail.com>2025-06-29 15:32:17 +0100
commit7f0778bcf28e3ba773a4f2a8204be8fe9d0cda78 (patch)
tree79e5195b2b81cc69db4614ecfb42601023c855c1 /src/termio/Termio.zig
parent0d55a1deefa3f67abb2981cc83b46af5058789b5 (diff)
termio: indicate support for OSC 52 in primary DA report
This is an extension agreed upon by modern terminals to indicate that they support copying to the clipboard with XTerm's OSC 52 sequence. It is only reported when writing to the clipboard is actually allowed.
Diffstat (limited to 'src/termio/Termio.zig')
-rw-r--r--src/termio/Termio.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/termio/Termio.zig b/src/termio/Termio.zig
index 865a2df86..8aaa87011 100644
--- a/src/termio/Termio.zig
+++ b/src/termio/Termio.zig
@@ -168,6 +168,7 @@ pub const DerivedConfig = struct {
foreground: configpkg.Config.Color,
background: configpkg.Config.Color,
osc_color_report_format: configpkg.Config.OSCColorReportFormat,
+ clipboard_write: configpkg.ClipboardAccess,
enquiry_response: []const u8,
pub fn init(
@@ -188,6 +189,7 @@ pub const DerivedConfig = struct {
.foreground = config.foreground,
.background = config.background,
.osc_color_report_format = config.@"osc-color-report-format",
+ .clipboard_write = config.@"clipboard-write",
.enquiry_response = try alloc.dupe(u8, config.@"enquiry-response"),
// This has to be last so that we copy AFTER the arena allocations
@@ -278,6 +280,7 @@ pub fn init(self: *Termio, alloc: Allocator, opts: termio.Options) !void {
.size = &self.size,
.terminal = &self.terminal,
.osc_color_report_format = opts.config.osc_color_report_format,
+ .clipboard_write = opts.config.clipboard_write,
.enquiry_response = opts.config.enquiry_response,
.default_foreground_color = opts.config.foreground.toTerminalRGB(),
.default_background_color = opts.config.background.toTerminalRGB(),