mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: parent styling for hovered; formatting revert
This commit is contained in:
parent
d933c0e6f1
commit
5eb72f09a5
2 changed files with 3 additions and 1 deletions
|
|
@ -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>,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue