From e3184c5f88293c650fbdc58b25b56121b012a763 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Thu, 26 May 2022 16:22:57 +0530 Subject: [PATCH] Update awesome-hacks.md --- docs/en/src/awesome-hacks.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/en/src/awesome-hacks.md b/docs/en/src/awesome-hacks.md index e45ef9a..1786d9c 100644 --- a/docs/en/src/awesome-hacks.md +++ b/docs/en/src/awesome-hacks.md @@ -434,14 +434,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 @@ -449,7 +450,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)