fix: parent styling for hovered; formatting revert

This commit is contained in:
stickyburn 2026-03-02 17:11:04 -05:00 committed by sxyazi
parent d933c0e6f1
commit 5eb72f09a5
No known key found for this signature in database
2 changed files with 3 additions and 1 deletions

View file

@ -5,7 +5,7 @@ use mlua::{UserData, UserDataFields, Value};
use crate::{Style, cached_field}; use crate::{Style, cached_field};
pub struct Icon { pub struct Icon {
inner: &'static yazi_config::Icon, inner: &'static yazi_config::Icon,
v_text: Option<Value>, v_text: Option<Value>,
v_style: Option<Value>, v_style: Option<Value>,
} }

View file

@ -29,6 +29,8 @@ function Entity:icon()
local icon = self._file:icon(self._file.is_hovered) local icon = self._file:icon(self._file.is_hovered)
if not icon then if not icon then
return "" return ""
elseif self._file.is_hovered then
return icon.text .. " "
else else
return ui.Line(icon.text .. " "):style(icon.style) return ui.Line(icon.text .. " "):style(icon.style)
end end