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();
// 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();

View file

@ -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) {