mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: clear sixel image with empty characters directly
On BlackBox \x2B[K doesn't work for sixel characters
This commit is contained in:
parent
2df1dae5af
commit
1d554dd0cf
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Add table
Reference in a new issue