From 9cd5d37ecf2a2277ca36c8c56bd3f651ad498edd Mon Sep 17 00:00:00 2001 From: bhagwan Date: Wed, 20 Apr 2022 15:09:27 -0700 Subject: [PATCH] fix: ueberzug image paths when entry.path is absolute --- lua/fzf-lua/previewer/builtin.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/fzf-lua/previewer/builtin.lua b/lua/fzf-lua/previewer/builtin.lua index e3e518c..7517a2d 100644 --- a/lua/fzf-lua/previewer/builtin.lua +++ b/lua/fzf-lua/previewer/builtin.lua @@ -359,7 +359,8 @@ function Previewer.buffer_or_file:populate_terminal_cmd(tmpbuf, cmd, entry) width = wincfg.width, height = wincfg.height, scaler = self.ueberzug_scaler, - path = path.join({self.opts.cwd or uv.cwd(), entry.path}), + path = path.starts_with_separator(entry.path) and entry.path or + path.join({self.opts.cwd or uv.cwd(), entry.path}), } local json = vim.json.encode(params) -- both 'fs_open|write|close' and 'vim.fn.system' work