mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-23 15:51:03 +00:00
feat: Fix imports
This commit is contained in:
parent
de881ce526
commit
fb6de19e81
2 changed files with 12 additions and 8 deletions
|
|
@ -1,7 +1,5 @@
|
|||
use anyhow::{Result, anyhow, bail};
|
||||
use ratatui::style;
|
||||
use ratatui::style::Style;
|
||||
use ratatui::{
|
||||
use ratatui_core::{
|
||||
layout::Size,
|
||||
text::{Line, Span, Text},
|
||||
};
|
||||
|
|
@ -19,7 +17,10 @@ use syntect::{
|
|||
use yazi_binding::elements::HighlightPosition;
|
||||
use yazi_config::{THEME, YAZI};
|
||||
use yazi_runner::previewer::PeekError;
|
||||
use yazi_shared::{id::{Id, Ids}, replace_to_printable};
|
||||
use yazi_shared::{
|
||||
id::{Id, Ids},
|
||||
replace_to_printable,
|
||||
};
|
||||
use yazi_shim::ratatui::LineIter;
|
||||
|
||||
static INCR: Ids = Ids::new();
|
||||
|
|
@ -137,7 +138,7 @@ impl Highlighter {
|
|||
if let Some(pos) = position
|
||||
&& pos.line == *i
|
||||
{
|
||||
static_line.style = Style::new().bg(style::Color::Red);
|
||||
static_line.style = ratatui_core::style::Style::new().bg(ratatui_core::style::Color::Red);
|
||||
}
|
||||
lines.push(static_line);
|
||||
}
|
||||
|
|
@ -172,7 +173,7 @@ impl Highlighter {
|
|||
if let Some(pos) = position
|
||||
&& pos.line == *i
|
||||
{
|
||||
static_line.style = Style::new().bg(style::Color::Red);
|
||||
static_line.style = ratatui_core::style::Style::new().bg(ratatui_core::style::Color::Red);
|
||||
}
|
||||
lines.push(static_line);
|
||||
}
|
||||
|
|
@ -264,7 +265,7 @@ impl Highlighter {
|
|||
|
||||
Span {
|
||||
content: s.into(),
|
||||
style: ratatui_core::style::Style {
|
||||
style: ratatui_core::style::Style {
|
||||
fg: Self::to_ansi_color(style.foreground),
|
||||
// bg: Self::to_ansi_color(style.background),
|
||||
add_modifier: modifier,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
use mlua::{ExternalError, Function, IntoLuaMulti, Lua, Table, Value};
|
||||
use yazi_binding::{Error, elements::Area};
|
||||
use yazi_binding::{
|
||||
Error,
|
||||
elements::{Area, HighlightPosition},
|
||||
};
|
||||
use yazi_core::{Highlighter, MgrProxy, tab::PreviewLock};
|
||||
use yazi_fs::FsUrl;
|
||||
use yazi_runner::previewer::PeekError;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue