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 max-preview"
|
||||
desc = "Maximize or restore preview"
|
||||
```
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
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
|
||||
|
||||
return ui.Layout()
|
||||
st.old = Tab.layout
|
||||
Tab.layout = function(self)
|
||||
self._chunks = ui.Layout()
|
||||
:direction(ui.Layout.HORIZONTAL)
|
||||
:constraints({
|
||||
ui.Constraint.Percentage(0),
|
||||
ui.Constraint.Percentage(0),
|
||||
ui.Constraint.Percentage(100),
|
||||
})
|
||||
:split(area)
|
||||
:split(self._area)
|
||||
end
|
||||
end
|
||||
ya.app_emit("resize", {})
|
||||
|
||||
Reference in New Issue
Block a user