this repo has no description
13
fork

Configure Feed

Select the types of activity you want to include in your feed.

vaxis: implement bracketed paste

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>

+16 -1
+1 -1
README.md
··· 19 19 | ------------------------------ | :---: | :------: | :-------: | 20 20 | RGB | ✅ | ✅ | ✅ | 21 21 | Hyperlinks | ✅ | planned | ❌ | 22 - | Bracketed Paste | ✅ | planned | ❌ | 22 + | Bracketed Paste | ✅ | ✅ | ❌ | 23 23 | Kitty Keyboard | ✅ | ✅ | ✅ | 24 24 | Styled Underlines | ✅ | ✅ | ✅ | 25 25 | Mouse Shapes (OSC 22) | ✅ | planned | ❌ |
+5
src/ctlseqs.zig
··· 14 14 pub const sync_set = "\x1b[?2026h"; 15 15 pub const sync_reset = "\x1b[?2026l"; 16 16 17 + // unicode 17 18 pub const unicode_set = "\x1b[?2027h"; 18 19 pub const unicode_reset = "\x1b[?2027l"; 20 + 21 + // bracketed paste 22 + pub const bp_set = "\x1b[?2004h"; 23 + pub const bp_reset = "\x1b[?2004l"; 19 24 20 25 // Key encoding 21 26 pub const csi_u_push = "\x1b[>{d}u";
+10
src/vaxis.zig
··· 500 500 .{title}, 501 501 ); 502 502 } 503 + 504 + // turn bracketed paste on or off. An event will be sent at the 505 + // beginning and end of a detected paste. All keystrokes between these 506 + // events were pasted 507 + pub fn bracketedPaste(self: *Self, enable: bool) !void { 508 + if (self.tty == null) return; 509 + const seq = if (enable) ctlseqs.bp_set else ctlseqs.bp_reset; 510 + _ = try self.tty.?.write(seq); 511 + try self.tty.?.flush(); 512 + } 503 513 }; 504 514 } 505 515