feat: adapt to https://github.com/sxyazi/yazi/pull/1257
This commit is contained in:
@@ -16,7 +16,7 @@ Add this to your `~/.config/yazi/keymap.toml`:
|
||||
|
||||
```toml
|
||||
[[manager.prepend_keymap]]
|
||||
on = [ "T" ]
|
||||
on = "T"
|
||||
run = "plugin --sync hide-preview"
|
||||
desc = "Hide or show preview"
|
||||
```
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
local function entry(st)
|
||||
if st.old then
|
||||
Manager.layout, st.old = st.old, nil
|
||||
Tab.layout, st.old = st.old, nil
|
||||
else
|
||||
st.old = Manager.layout
|
||||
Manager.layout = function(self, area)
|
||||
self.area = area
|
||||
|
||||
st.old = Tab.layout
|
||||
Tab.layout = function(self)
|
||||
local all = MANAGER.ratio.parent + MANAGER.ratio.current
|
||||
return ui.Layout()
|
||||
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(area)
|
||||
:split(self._area)
|
||||
end
|
||||
end
|
||||
ya.app_emit("resize", {})
|
||||
|
||||
Reference in New Issue
Block a user