Skip to content

Commit

Permalink
fix: adapt to sxyazi/yazi#1257 (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi authored Jul 15, 2024
1 parent 6197e4c commit f386ea3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ end)

return {
setup = function(st)
Header.cwd = function()
Header:children_remove(1, Header.LEFT)
Header:children_add(function() return ui.Line.parse(st.output or "") end, 1000, Header.LEFT)

ps.sub("cd", function()
local cwd = cx.active.current.cwd
if st.cwd ~= cwd then
st.cwd = cwd
ya.manager_emit("plugin", { st._name, args = ya.quote(tostring(cwd)) })
ya.manager_emit("plugin", { st._id, args = ya.quote(tostring(cwd), true) })
end

return ui.Line.parse(st.output or "")
end
end)
end,

entry = function(_, args)
Expand Down

0 comments on commit f386ea3

Please sign in to comment.