mirror of
https://github.com/sxyazi/yazi.git
synced 2024-12-24 09:12:43 +03:00
fix: clear Sixel image with empty characters instead of \x2B[K
to be compatible with GNOME VTE (#309)
This commit is contained in:
parent
bfc1dcb4f6
commit
55187496fa
@ -21,10 +21,11 @@ impl Sixel {
|
||||
|
||||
pub(super) fn image_hide(rect: Rect) -> Result<()> {
|
||||
let stdout = BufWriter::new(stdout().lock());
|
||||
let s = " ".repeat(rect.width as usize);
|
||||
Term::move_lock(stdout, (0, 0), |stdout| {
|
||||
for y in rect.top()..rect.bottom() {
|
||||
Term::move_to(stdout, rect.x, y)?;
|
||||
Term::kill_to_end(stdout)?;
|
||||
stdout.write_all(s.as_bytes())?;
|
||||
}
|
||||
Ok(())
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user