chore: bump the minimum required Yazi version to 25.2.7
This commit is contained in:
26
hide-preview.yazi/main.lua
Normal file
26
hide-preview.yazi/main.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
--- @since 25.2.7
|
||||
--- @sync entry
|
||||
|
||||
local function entry(st)
|
||||
if st.old then
|
||||
Tab.layout, st.old = st.old, nil
|
||||
else
|
||||
st.old = Tab.layout
|
||||
Tab.layout = function(self)
|
||||
local all = MANAGER.ratio.parent + MANAGER.ratio.current
|
||||
self._chunks = ui.Layout()
|
||||
:direction(ui.Layout.HORIZONTAL)
|
||||
:constraints({
|
||||
ui.Constraint.Ratio(MANAGER.ratio.parent, all),
|
||||
ui.Constraint.Ratio(MANAGER.ratio.current, all),
|
||||
ui.Constraint.Length(1),
|
||||
})
|
||||
:split(self._area)
|
||||
end
|
||||
end
|
||||
ya.app_emit("resize", {})
|
||||
end
|
||||
|
||||
local function enabled(st) return st.old ~= nil end
|
||||
|
||||
return { entry = entry, enabled = enabled }
|
||||
Reference in New Issue
Block a user