mirror of
https://github.com/sayanarijit/xplr
synced 2024-11-16 12:13:09 +00:00
deploy: e3184c5f88
This commit is contained in:
parent
04df816489
commit
166df791a4
@ -528,14 +528,15 @@ xplr.config.layouts.builtin.default = {
|
||||
{
|
||||
CustomContent = {
|
||||
title = "preview",
|
||||
body = { DynamicParagraph = { render = "custom.render_layout" } },
|
||||
body = { DynamicParagraph = { render = "custom.preview_pane.render" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
xplr.fn.custom.render_layout = function(ctx)
|
||||
xplr.fn.custom.preview_pane = {}
|
||||
xplr.fn.custom.preview_pane.render = function(ctx)
|
||||
local n = ctx.app.focused_node
|
||||
|
||||
if n.canonical then
|
||||
@ -543,7 +544,7 @@ xplr.fn.custom.render_layout = function(ctx)
|
||||
end
|
||||
|
||||
if n then
|
||||
if n.is_file and not n.is_symlink then
|
||||
if n.is_file then
|
||||
return read(n.absolute_path, ctx.layout_size.height)
|
||||
else
|
||||
return stat(n)
|
||||
|
@ -3834,14 +3834,15 @@ xplr.config.layouts.builtin.default = {
|
||||
{
|
||||
CustomContent = {
|
||||
title = "preview",
|
||||
body = { DynamicParagraph = { render = "custom.render_layout" } },
|
||||
body = { DynamicParagraph = { render = "custom.preview_pane.render" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
xplr.fn.custom.render_layout = function(ctx)
|
||||
xplr.fn.custom.preview_pane = {}
|
||||
xplr.fn.custom.preview_pane.render = function(ctx)
|
||||
local n = ctx.app.focused_node
|
||||
|
||||
if n.canonical then
|
||||
@ -3849,7 +3850,7 @@ xplr.fn.custom.render_layout = function(ctx)
|
||||
end
|
||||
|
||||
if n then
|
||||
if n.is_file and not n.is_symlink then
|
||||
if n.is_file then
|
||||
return read(n.absolute_path, ctx.layout_size.height)
|
||||
else
|
||||
return stat(n)
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user