render: skip clearing images if they aren't supported

This commit is contained in:
Tim Culverhouse 2024-05-03 13:57:03 -05:00
parent 0fe1142989
commit 6abfd8fc3f
2 changed files with 3 additions and 2 deletions

View file

@ -33,7 +33,7 @@ pub fn main() !void {
defer loop.stop(); defer loop.stop();
// Optionally enter the alternate screen // Optionally enter the alternate screen
try vx.enterAltScreen(); // try vx.enterAltScreen();
var nvim = try vaxis.widgets.nvim.Nvim(Event).init(alloc, &loop); var nvim = try vaxis.widgets.nvim.Nvim(Event).init(alloc, &loop);
try nvim.spawn(); try nvim.spawn();

View file

@ -251,6 +251,7 @@ pub fn render(self: *Vaxis) !void {
} = .{}; } = .{};
// Clear all images // Clear all images
if (self.caps.kitty_graphics)
_ = try tty.write(ctlseqs.kitty_graphics_clear); _ = try tty.write(ctlseqs.kitty_graphics_clear);
var i: usize = 0; var i: usize = 0;