From 9df256f7f4abc312ae94b59c948502310ecb2c87 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Wed, 5 Jun 2024 17:00:18 +0800 Subject: [PATCH] fix: disable error reporting for the kitty graphics protocol --- yazi-adaptor/src/kitty.rs | 4 ++-- yazi-adaptor/src/kitty_old.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/yazi-adaptor/src/kitty.rs b/yazi-adaptor/src/kitty.rs index 8d056590..35518e53 100644 --- a/yazi-adaptor/src/kitty.rs +++ b/yazi-adaptor/src/kitty.rs @@ -337,7 +337,7 @@ impl Kitty { write!(stderr, "{s}")?; } - write!(stderr, "{}_Gq=1,a=d,d=A{}\\{}", START, ESCAPE, CLOSE)?; + write!(stderr, "{}_Gq=2,a=d,d=A{}\\{}", START, ESCAPE, CLOSE)?; Ok(()) }) } @@ -351,7 +351,7 @@ impl Kitty { if let Some(first) = it.next() { write!( buf, - "{}_Gq=1,a=T,i=1,C=1,U=1,f={},s={},v={},m={};{}{}\\{}", + "{}_Gq=2,a=T,i=1,C=1,U=1,f={},s={},v={},m={};{}{}\\{}", START, format, size.0, diff --git a/yazi-adaptor/src/kitty_old.rs b/yazi-adaptor/src/kitty_old.rs index 432765a7..860e2392 100644 --- a/yazi-adaptor/src/kitty_old.rs +++ b/yazi-adaptor/src/kitty_old.rs @@ -28,7 +28,7 @@ impl KittyOld { #[inline] pub(super) fn image_erase(_: Rect) -> Result<()> { let mut stderr = LineWriter::new(stderr()); - write!(stderr, "{}_Gq=1,a=d,d=A{}\\{}", START, ESCAPE, CLOSE)?; + write!(stderr, "{}_Gq=2,a=d,d=A{}\\{}", START, ESCAPE, CLOSE)?; stderr.flush()?; Ok(()) } @@ -42,7 +42,7 @@ impl KittyOld { if let Some(first) = it.next() { write!( buf, - "{}_Gq=1,a=T,z=-1,C=1,f={},s={},v={},m={};{}{}\\{}", + "{}_Gq=2,a=T,z=-1,C=1,f={},s={},v={},m={};{}{}\\{}", START, format, size.0,