mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
da62d6d7c2
commit
1bee98aa39
5 changed files with 8 additions and 30 deletions
|
|
@ -1,7 +1,4 @@
|
|||
use std::{
|
||||
path::{Path, PathBuf},
|
||||
sync::atomic::{AtomicBool, Ordering},
|
||||
};
|
||||
use std::{path::{Path, PathBuf}, sync::atomic::{AtomicBool, Ordering}};
|
||||
|
||||
use anyhow::Result;
|
||||
use config::{preview::PreviewAdaptor, BOOT, PREVIEW};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
use std::{
|
||||
io::{stdout, BufWriter, Write},
|
||||
path::Path,
|
||||
};
|
||||
use std::{io::{stdout, BufWriter, Write}, path::Path};
|
||||
|
||||
use anyhow::Result;
|
||||
use base64::{engine::general_purpose, Engine};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
use std::{
|
||||
io::{stdout, Write},
|
||||
path::Path,
|
||||
};
|
||||
use std::{io::{stdout, Write}, path::Path};
|
||||
|
||||
use anyhow::Result;
|
||||
use base64::{engine::general_purpose, Engine};
|
||||
|
|
@ -23,9 +20,7 @@ impl Kitty {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub(super) fn image_hide() -> Result<()> {
|
||||
Ok(stdout().write_all(b"\x1b\\\x1b_Ga=d\x1b\\")?)
|
||||
}
|
||||
pub(super) fn image_hide() -> Result<()> { Ok(stdout().write_all(b"\x1b\\\x1b_Ga=d\x1b\\")?) }
|
||||
|
||||
async fn encode(img: DynamicImage) -> Result<Vec<u8>> {
|
||||
fn output(raw: &[u8], format: u8, size: (u32, u32)) -> Result<Vec<u8>> {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
use std::{
|
||||
io::{stdout, BufWriter, Write},
|
||||
path::Path,
|
||||
};
|
||||
use std::{io::{stdout, BufWriter, Write}, path::Path};
|
||||
|
||||
use anyhow::{bail, Result};
|
||||
use color_quant::NeuQuant;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
use std::io::{stdout, Write};
|
||||
|
||||
use anyhow::Result;
|
||||
use crossterm::{
|
||||
cursor::{MoveTo, RestorePosition, SavePosition, SetCursorStyle},
|
||||
execute, queue,
|
||||
terminal::{Clear, ClearType},
|
||||
};
|
||||
use crossterm::{cursor::{MoveTo, RestorePosition, SavePosition, SetCursorStyle}, execute, queue, terminal::{Clear, ClearType}};
|
||||
|
||||
use crate::Term;
|
||||
|
||||
|
|
@ -46,12 +42,8 @@ impl Term {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_cursor_block() -> Result<()> {
|
||||
Ok(execute!(stdout(), SetCursorStyle::BlinkingBlock)?)
|
||||
}
|
||||
pub fn set_cursor_block() -> Result<()> { Ok(execute!(stdout(), SetCursorStyle::BlinkingBlock)?) }
|
||||
|
||||
#[inline]
|
||||
pub fn set_cursor_bar() -> Result<()> {
|
||||
Ok(execute!(stdout(), SetCursorStyle::BlinkingBar)?)
|
||||
}
|
||||
pub fn set_cursor_bar() -> Result<()> { Ok(execute!(stdout(), SetCursorStyle::BlinkingBar)?) }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue