paste: fix bracketed_paste enabling

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
This commit is contained in:
Tim Culverhouse 2024-04-03 18:10:23 -05:00
parent 8f53700302
commit 4118c5f8bc

View file

@ -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();
}