feat: Fix imports

This commit is contained in:
Jed 2026-06-21 19:31:34 +02:00
parent de881ce526
commit fb6de19e81
2 changed files with 12 additions and 8 deletions

View file

@ -1,7 +1,5 @@
use anyhow::{Result, anyhow, bail}; use anyhow::{Result, anyhow, bail};
use ratatui::style; use ratatui_core::{
use ratatui::style::Style;
use ratatui::{
layout::Size, layout::Size,
text::{Line, Span, Text}, text::{Line, Span, Text},
}; };
@ -19,7 +17,10 @@ use syntect::{
use yazi_binding::elements::HighlightPosition; use yazi_binding::elements::HighlightPosition;
use yazi_config::{THEME, YAZI}; use yazi_config::{THEME, YAZI};
use yazi_runner::previewer::PeekError; 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; use yazi_shim::ratatui::LineIter;
static INCR: Ids = Ids::new(); static INCR: Ids = Ids::new();
@ -137,7 +138,7 @@ impl Highlighter {
if let Some(pos) = position if let Some(pos) = position
&& pos.line == *i && 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); lines.push(static_line);
} }
@ -172,7 +173,7 @@ impl Highlighter {
if let Some(pos) = position if let Some(pos) = position
&& pos.line == *i && 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); lines.push(static_line);
} }
@ -264,7 +265,7 @@ impl Highlighter {
Span { Span {
content: s.into(), content: s.into(),
style: ratatui_core::style::Style { style: ratatui_core::style::Style {
fg: Self::to_ansi_color(style.foreground), fg: Self::to_ansi_color(style.foreground),
// bg: Self::to_ansi_color(style.background), // bg: Self::to_ansi_color(style.background),
add_modifier: modifier, add_modifier: modifier,

View file

@ -1,5 +1,8 @@
use mlua::{ExternalError, Function, IntoLuaMulti, Lua, Table, Value}; 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_core::{Highlighter, MgrProxy, tab::PreviewLock};
use yazi_fs::FsUrl; use yazi_fs::FsUrl;
use yazi_runner::previewer::PeekError; use yazi_runner::previewer::PeekError;