diff --git a/yazi-binding/src/icon.rs b/yazi-binding/src/icon.rs index d08f0410..c2c87c53 100644 --- a/yazi-binding/src/icon.rs +++ b/yazi-binding/src/icon.rs @@ -5,7 +5,7 @@ use mlua::{UserData, UserDataFields, Value}; use crate::{Style, cached_field}; pub struct Icon { - inner: &'static yazi_config::Icon, + inner: &'static yazi_config::Icon, v_text: Option, v_style: Option, } diff --git a/yazi-plugin/preset/components/entity.lua b/yazi-plugin/preset/components/entity.lua index 328451ff..887fd7ba 100644 --- a/yazi-plugin/preset/components/entity.lua +++ b/yazi-plugin/preset/components/entity.lua @@ -29,6 +29,8 @@ function Entity:icon() local icon = self._file:icon(self._file.is_hovered) if not icon then return "" + elseif self._file.is_hovered then + return icon.text .. " " else return ui.Line(icon.text .. " "):style(icon.style) end