mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00: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
1 changed files with 2 additions and 1 deletions
|
|
@ -21,10 +21,11 @@ impl Sixel {
|
||||||
|
|
||||||
pub(super) fn image_hide(rect: Rect) -> Result<()> {
|
pub(super) fn image_hide(rect: Rect) -> Result<()> {
|
||||||
let stdout = BufWriter::new(stdout().lock());
|
let stdout = BufWriter::new(stdout().lock());
|
||||||
|
let s = " ".repeat(rect.width as usize);
|
||||||
Term::move_lock(stdout, (0, 0), |stdout| {
|
Term::move_lock(stdout, (0, 0), |stdout| {
|
||||||
for y in rect.top()..rect.bottom() {
|
for y in rect.top()..rect.bottom() {
|
||||||
Term::move_to(stdout, rect.x, y)?;
|
Term::move_to(stdout, rect.x, y)?;
|
||||||
Term::kill_to_end(stdout)?;
|
stdout.write_all(s.as_bytes())?;
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue