fix: disable error reporting for the kitty graphics protocol

This commit is contained in:
sxyazi 2024-06-05 17:00:18 +08:00
parent 5f8c20e2b5
commit 9df256f7f4
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View file

@ -337,7 +337,7 @@ impl Kitty {
write!(stderr, "{s}")?; 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(()) Ok(())
}) })
} }
@ -351,7 +351,7 @@ impl Kitty {
if let Some(first) = it.next() { if let Some(first) = it.next() {
write!( write!(
buf, 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, START,
format, format,
size.0, size.0,

View file

@ -28,7 +28,7 @@ impl KittyOld {
#[inline] #[inline]
pub(super) fn image_erase(_: Rect) -> Result<()> { pub(super) fn image_erase(_: Rect) -> Result<()> {
let mut stderr = LineWriter::new(stderr()); 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()?; stderr.flush()?;
Ok(()) Ok(())
} }
@ -42,7 +42,7 @@ impl KittyOld {
if let Some(first) = it.next() { if let Some(first) = it.next() {
write!( write!(
buf, 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, START,
format, format,
size.0, size.0,