From 3079c9561a1b1ef074825f9b243f079b6001ffec Mon Sep 17 00:00:00 2001 From: bhagwan Date: Sat, 11 Jun 2022 00:51:33 -0700 Subject: [PATCH] fix(show_cwd_header): when set to 'true' and 'cwd' matches ':pwd' --- lua/fzf-lua/core.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/fzf-lua/core.lua b/lua/fzf-lua/core.lua index b3f07e4..f82d243 100644 --- a/lua/fzf-lua/core.lua +++ b/lua/fzf-lua/core.lua @@ -479,9 +479,9 @@ M.set_header = function(opts, hdr_tbl) val = function() -- do not display header when we're inside our -- cwd unless the caller specifically requested - if opts.show_cwd_header == false - or (not opts.show_cwd_header and not opts.cwd) - or opts.cwd == vim.loop.cwd() then + if opts.show_cwd_header == false or + not opts.show_cwd_header and + (not opts.cwd or opts.cwd == vim.loop.cwd()) then return end local cwd = opts.cwd or vim.loop.cwd()