This commit is contained in:
Yahddyyp 2026-07-21 15:27:12 +05:30 committed by GitHub
commit 555c7e72b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 16 additions and 3 deletions

View file

@ -28,6 +28,7 @@ overall = {}
[mgr]
cwd = { fg = "cyan" }
filter_keyword = { fg = "red", bold = true }
# Find
find_keyword = { fg = "yellow", bold = true, italic = true, underline = true }

View file

@ -28,6 +28,7 @@ overall = {}
[mgr]
cwd = { fg = "cyan" }
filter_keyword = { fg = "red", bold = true }
# Find
find_keyword = { fg = "yellow", bold = true, italic = true, underline = true }

View file

@ -71,6 +71,9 @@ pub struct Mgr {
pub find_keyword: SyncCell<StyleFlat>,
pub find_position: SyncCell<StyleFlat>,
// Filter
pub filter_keyword: SyncCell<StyleFlat>,
// Symlink
pub symlink_target: SyncCell<StyleFlat>,

View file

@ -27,8 +27,14 @@ function Header:cwd()
return ""
end
local s = ya.readable_path(tostring(self._current.cwd)) .. self:flags()
return ui.Span(ui.truncate(s, { max = max, rtl = true })):style(th.mgr.cwd)
local path = ya.readable_path(tostring(self._current.cwd))
local flags = self:flags()
local flag_str = #flags == 0 and "" or " (" .. table.concat(flags, ", ") .. ")"
return ui.Line {
ui.Span(ui.truncate(path, { max = max - #flag_str, rtl = true })):style(th.mgr.cwd),
ui.Span(flag_str):style(th.mgr.filter_keyword),
}
end
function Header:flags()
@ -46,7 +52,7 @@ function Header:flags()
if finder then
t[#t + 1] = string.format("find: %s", finder)
end
return #t == 0 and "" or " (" .. table.concat(t, ", ") .. ")"
return t
end
function Header:count()

View file

@ -60,6 +60,8 @@ fn mgr() -> Composer<ComposerGet, ComposerSet> {
b"find_keyword" => Style::from(&m.find_keyword).into_lua(lua),
b"find_position" => Style::from(&m.find_position).into_lua(lua),
b"filter_keyword" => Style::from(&m.filter_keyword).into_lua(lua),
b"symlink_target" => Style::from(&m.symlink_target).into_lua(lua),
b"marker_copied" => Style::from(&m.marker_copied).into_lua(lua),