From 4fae64e4305fbc062455833a5d4cd32435f09e31 Mon Sep 17 00:00:00 2001 From: bhagwan Date: Thu, 7 Dec 2023 17:30:40 -0800 Subject: [PATCH] chore: prioritize `preview_pager` over preview `opts.pager` --- lua/fzf-lua/previewer/codeaction.lua | 2 +- lua/fzf-lua/previewer/fzf.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/fzf-lua/previewer/codeaction.lua b/lua/fzf-lua/previewer/codeaction.lua index df928676..62065cbc 100644 --- a/lua/fzf-lua/previewer/codeaction.lua +++ b/lua/fzf-lua/previewer/codeaction.lua @@ -213,7 +213,7 @@ function M.native:new(o, opts, fzf_win) assert(opts._ui_select and opts._ui_select.kind == "codeaction") M.native.super.new(self, o, opts, fzf_win) setmetatable(self, M.native) - self.pager = o.pager or opts.preview_pager + self.pager = opts.preview_pager == nil and o.pager or opts.preview_pager self.diff_opts = o.diff_opts return self end diff --git a/lua/fzf-lua/previewer/fzf.lua b/lua/fzf-lua/previewer/fzf.lua index 7f126694..e2f1aff3 100644 --- a/lua/fzf-lua/previewer/fzf.lua +++ b/lua/fzf-lua/previewer/fzf.lua @@ -246,7 +246,7 @@ function Previewer.git_diff:new(o, opts) self.cmd_deleted = path.git_cwd(o.cmd_deleted, opts) self.cmd_modified = path.git_cwd(o.cmd_modified, opts) self.cmd_untracked = path.git_cwd(o.cmd_untracked, opts) - self.pager = o.pager or opts.preview_pager + self.pager = opts.preview_pager == nil and o.pager or opts.preview_pager do -- populate the icon mappings local icons_overrides = o._fn_git_icons and o._fn_git_icons()