Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vaxis: add osc52 copy/paste support #28

Merged
merged 1 commit into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/cli.zig
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn main() !void {

var loop: vaxis.Loop(Event) = .{ .vaxis = &vx };

try loop.run();
try loop.run(alloc);
defer loop.stop();

try vx.queryTerminal();
Expand Down
2 changes: 1 addition & 1 deletion examples/image.zig
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub fn main() !void {

var loop: vaxis.Loop(Event) = .{ .vaxis = &vx };

try loop.run();
try loop.run(alloc);
defer loop.stop();

try vx.enterAltScreen();
Expand Down
2 changes: 1 addition & 1 deletion examples/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub fn main() !void {

// Start the read loop. This puts the terminal in raw mode and begins
// reading user input
try loop.run();
try loop.run(alloc);
defer loop.stop();

// Optionally enter the alternate screen
Expand Down
2 changes: 1 addition & 1 deletion examples/nvim.zig
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub fn main() !void {

var loop: vaxis.Loop(Event) = .{ .vaxis = &vx };

try loop.run();
try loop.run(alloc);
defer loop.stop();

// Optionally enter the alternate screen
Expand Down
2 changes: 1 addition & 1 deletion examples/pathological.zig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub fn main() !void {

var loop: vaxis.Loop(Event) = .{ .vaxis = &vx };

try loop.run();
try loop.run(alloc);
defer loop.stop();
try vx.enterAltScreen();
try vx.queryTerminal();
Expand Down
2 changes: 1 addition & 1 deletion examples/shell.zig
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn main() !void {

var loop: vaxis.Loop(Event) = .{ .vaxis = &vx };

try loop.run();
try loop.run(alloc);
defer loop.stop();

try vx.queryTerminal();
Expand Down
2 changes: 1 addition & 1 deletion examples/table.zig
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub fn main() !void {
winsize: vaxis.Winsize,
}) = .{ .vaxis = &vx };

try loop.run();
try loop.run(alloc);
defer loop.stop();
try vx.enterAltScreen();
try vx.queryTerminal();
Expand Down
4 changes: 2 additions & 2 deletions examples/text_input.zig
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub fn main() !void {

// Start the read loop. This puts the terminal in raw mode and begins
// reading user input
try loop.run();
try loop.run(alloc);
defer loop.stop();

// Optionally enter the alternate screen
Expand Down Expand Up @@ -85,7 +85,7 @@ pub fn main() !void {
loop.stop();
var child = std.process.Child.init(&.{"nvim"}, alloc);
_ = try child.spawnAndWait();
try loop.run();
try loop.run(alloc);
try vx.enterAltScreen();
vx.queueRefresh();
} else if (key.matches(vaxis.Key.enter, .{})) {
Expand Down
1 change: 1 addition & 0 deletions src/Loop.zig
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub fn Loop(comptime T: type) type {
T,
self,
&self.vaxis.unicode.grapheme_data,
self.vaxis.opts.system_clipboard_allocator,
});
}

Expand Down
Loading