README update: 'no_global_resume' option clarfication

main
bhagwan 2 years ago
parent a6213f05e1
commit e1674cd8f5

@ -214,6 +214,9 @@ Consult the list below for available settings:
local actions = require "fzf-lua.actions"
require'fzf-lua'.setup {
global_resume = true, -- enable global `resume`?
-- send 'no_global_resume = true'
-- to exclude specific providers
-- from being resumed
winopts = {
-- split = "belowright new",-- open in a split instead?
-- "belowright new" : split below

@ -248,6 +248,9 @@ Consult the list below for available settings:
local actions = require "fzf-lua.actions"
require'fzf-lua'.setup {
global_resume = true, -- enable global `resume`?
-- send 'no_global_resume = true'
-- to exclude specific providers
-- from being resumed
winopts = {
-- split = "belowright new",-- open in a split instead?
-- "belowright new" : split below

@ -47,9 +47,7 @@ end
M.fzf = function(opts, contents)
-- support global resume?
if config.globals.global_resume and
not opts.no_resume and
not opts.no_global_resume then
if config.globals.global_resume and not opts.no_global_resume then
config.__resume_data = config.__resume_data or {}
config.__resume_data.opts = vim.deepcopy(opts)
config.__resume_data.contents = contents and vim.deepcopy(contents) or nil

@ -31,11 +31,10 @@ M.metatable = function(opts)
opts.fzf_opts['--preview-window'] = 'hidden:down:10'
opts.fzf_opts['--no-multi'] = ''
if opts.no_resume == nil and
opts.no_global_resume == nil then
-- builtin default is no resume as
-- the behavior might confuse users (#267)
opts.no_resume = true
if opts.no_global_resume == nil then
-- builtin is excluded by from global resume
-- as the behavior might confuse users (#267)
opts.no_global_resume = true
end
core.fzf_wrap(opts, methods, function(selected)

Loading…
Cancel
Save