@@ -282,11 +282,8 @@ function M.normalize_opts(opts, globals, __resume_key)
282282 end
283283 end
284284
285- -- Merge values from globals
286- for _ , k in ipairs ({
287- " winopts" , " keymap" , " fzf_opts" , " fzf_colors" , " fzf_tmux_opts" , " hls"
288- }) do
289- local setup_val = M .globals [k ]
285+ local extend_opts = function (m , k )
286+ local setup_val = m [k ]
290287 if type (setup_val ) == " function" then
291288 setup_val = setup_val (opts )
292289 if type (setup_val ) == " table" then
@@ -314,6 +311,14 @@ function M.normalize_opts(opts, globals, __resume_key)
314311 end
315312 end
316313
314+ -- Merge values from globals
315+ for _ , k in ipairs ({
316+ " winopts" , " keymap" , " fzf_opts" , " fzf_colors" , " fzf_tmux_opts" , " hls"
317+ }) do
318+ extend_opts (globals , k )
319+ extend_opts (M .globals , k )
320+ end
321+
317322 -- backward compat: no-value flags should be set to `true`, in the past these
318323 -- would be set to an empty string which would now translate into a shell escaped
319324 -- string as we automatically shell escape all fzf_opts
@@ -661,7 +666,7 @@ function M.normalize_opts(opts, globals, __resume_key)
661666 opts .fzf_bin = fzf_plug
662667 end
663668 end
664- if not executable (opts .fzf_bin , utils .err ,
669+ if not executable (opts .fzf_bin , utils .error ,
665670 " aborting. Please make sure 'fzf' is in installed." ) then
666671 return nil
667672 end
0 commit comments