Skip to content

Commit

Permalink
render: skip clearing images if they aren't supported
Browse files Browse the repository at this point in the history
  • Loading branch information
rockorager committed May 3, 2024
1 parent 0fe1142 commit 6abfd8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/nvim.zig
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub fn main() !void {
defer loop.stop();

// Optionally enter the alternate screen
try vx.enterAltScreen();
// try vx.enterAltScreen();

var nvim = try vaxis.widgets.nvim.Nvim(Event).init(alloc, &loop);
try nvim.spawn();
Expand Down
3 changes: 2 additions & 1 deletion src/Vaxis.zig
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ pub fn render(self: *Vaxis) !void {
} = .{};

// Clear all images
_ = try tty.write(ctlseqs.kitty_graphics_clear);
if (self.caps.kitty_graphics)
_ = try tty.write(ctlseqs.kitty_graphics_clear);

var i: usize = 0;
while (i < self.screen.buf.len) {
Expand Down

0 comments on commit 6abfd8f

Please sign in to comment.