Skip to content

Commit 8337813

Browse files
committed
feat(hide): disable with no_resume (#2425)
1 parent 9fa87ea commit 8337813

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

lua/fzf-lua/defaults.lua

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,13 +1178,14 @@ M.defaults.diagnostics = {
11781178
}
11791179

11801180
M.defaults.builtin = {
1181-
winopts = { height = 0.65, width = 0.50, preview = { hidden = true } },
1182-
fzf_opts = { ["--no-multi"] = true },
1183-
preview = function(args)
1181+
no_resume = true,
1182+
winopts = { height = 0.65, width = 0.50, preview = { hidden = true } },
1183+
fzf_opts = { ["--no-multi"] = true },
1184+
preview = function(args)
11841185
local options_md = require("fzf-lua.cmd").options_md()
11851186
return type(options_md) == "table" and options_md[args[1]:lower()] or ""
11861187
end,
1187-
actions = { ["enter"] = actions.run_builtin },
1188+
actions = { ["enter"] = actions.run_builtin },
11881189
}
11891190

11901191
M.defaults.profiles = {

lua/fzf-lua/profiles/hide.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ return {
1313
},
1414
defaults = {
1515
enrich = function(opts)
16+
-- Do not hide if resume is disabled (#2425)
17+
if opts.no_resume then return opts end
1618
if opts._is_fzf_tmux then
1719
fzf.utils.warn("'hide' profile cannot work with tmux, ignoring.")
1820
return opts

lua/fzf-lua/providers/meta.lua

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ M.metatable = function(opts)
2121

2222
table.sort(methods, function(a, b) return a < b end)
2323

24-
-- builtin is excluded from global resume
25-
-- as the behavior might confuse users (#267)
26-
opts.no_resume = true
27-
2824
return core.fzf_exec(methods, opts)
2925
end
3026

0 commit comments

Comments
 (0)