From 4118c5f8bcdbfd242de4077f16a59c126a22ca43 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Wed, 3 Apr 2024 18:10:23 -0500 Subject: [PATCH] paste: fix bracketed_paste enabling Signed-off-by: Tim Culverhouse --- src/vaxis.zig | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/vaxis.zig b/src/vaxis.zig index a5e1c0f..e33bd3c 100644 --- a/src/vaxis.zig +++ b/src/vaxis.zig @@ -582,13 +582,10 @@ pub fn Vaxis(comptime T: type) type { pub fn setBracketedPaste(self: *Self, enable: bool) !void { if (self.tty == null) return; self.state.bracketed_paste = enable; - const seq = if (enable) { - self.state.bracketed_paste = true; - ctlseqs.bp_set; - } else { - self.state.bracketed_paste = true; + const seq = if (enable) + ctlseqs.bp_set + else ctlseqs.bp_reset; - }; _ = try self.tty.?.write(seq); try self.tty.?.flush(); }