From fd567e008124428c281255feaa53873029326679 Mon Sep 17 00:00:00 2001 From: bhagwan Date: Fri, 2 Feb 2024 09:07:31 -0500 Subject: [PATCH] fix(git_commits): invalid width with git-delta (closes #1023) --- lua/fzf-lua/providers/git.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/fzf-lua/providers/git.lua b/lua/fzf-lua/providers/git.lua index 141c331e..ca920fae 100644 --- a/lua/fzf-lua/providers/git.lua +++ b/lua/fzf-lua/providers/git.lua @@ -106,6 +106,11 @@ M.commits = function(opts) if opts.preview_pager then opts.preview = string.format("%s | %s", opts.preview, opts.preview_pager) end + if vim.o.shell and vim.o.shell:match("fish$") then + -- TODO: why does fish shell refuse to pass along $COLUMNS + -- to delta while the same exact commands works with bcommits? + opts.preview = "sh -c " .. libuv.shellescape(opts.preview) + end end opts = core.set_header(opts, opts.headers or { "actions", "cwd" }) return git_cmd(opts)