@ 261105.2

250910.18 · 4932f6426c840ba818a08a7bd35cf8b2ff01c0a4

chore: fzf_live nop when multiprocess=false

reading declarations

lua/fzf-lua/core.lua

@@ -159,6 +159,12 @@ M.fzf_exec = function(contents, opts)   return M.fzf_wrap(cmd, opts, true) end +local nop = function(opts)+  return not opts.fn_transform+      and not opts.fn_preprocess+      and not opts.fn_postprocess+end+ ---@param opts table ---@return boolean M.can_transform = function(opts)@@ -166,9 +172,7 @@ M.can_transform = function(opts)       and opts.fn_reload -- currently only used for "live" picker       and opts.rg_glob       and not opts.multiprocess-      and not opts.fn_transform-      and not opts.fn_preprocess-      and not opts.fn_postprocess+      and nop(opts) end  -- Append query placeholder if not found in command@@ -210,6 +214,7 @@ M.fzf_live = function(contents, opts)     contents = add_query_placeholder(contents)     local mtcmd = shell.stringify_mt(contents, opts)     cmd = mtcmd and M.expand_query(mtcmd, fzf_field_index)+        or type(contents) == "string" and nop(opts) and M.expand_query(contents, fzf_field_index)         or shell.stringify(cmd2fnc(contents), opts, fzf_field_index)   end   M.setup_fzf_live_flags(cmd, fzf_field_index, opts)

tests/screenshots/tests-api_spec.lua---api---fzf_live---rg---error---1-+-args-{-false-}

@@ -2,13 +2,13 @@ 01|                                                                 02|~                                                                03|~      ╭─────────────────────────────────────────────────╮      -04|~      │> [                                          5/5 │      +04|~      │> [                                          4/4 │       05|~      │──────────────────────────────────────────────── │      -06|~      │▌ [DEBUG] [st] rg --column --line-number --sma·· │      -07|~      │  rg: regex parse error:                         │      -08|~      │      (?:[)                                      │      -09|~      │         ^                                       │      -10|~      │  error: unclosed character class                │      +06|~      │▌ rg: regex parse error:                         │      +07|~      │      (?:[)                                      │      +08|~      │         ^                                       │      +09|~      │  error: unclosed character class                │      +10|~      │                                                 │       11|~      │                                                 │       12|~      │                                                 │       13|~      │                                                 │      

tests/screenshots/tests-api_spec.lua---api---fzf_live---rg---no-error---1-+-args-{-'['-}

@@ -2,9 +2,9 @@ 01|                                                                 02|~                                                                03|~      ╭─────────────────────────────────────────────────╮      -04|~      │> [                                          1/1 │      +04|~      │> [                                          0/0 │       05|~      │──────────────────────────────────────────────── │      -06|~      │▌ [DEBUG] [st] rg --column --line-number --sma·· │      +06|~      │                                                 │       07|~      │                                                 │       08|~      │                                                 │       09|~      │                                                 │      

tests/screenshots/tests-api_spec.lua---api---fzf_live---rg---no-error---1-+-args-{-'table-of-cont'-}

@@ -2,11 +2,11 @@ 01|                                                                 02|~                                                                03|~      ╭─────────────────────────────────────────────────╮      -04|~      │> table of cont                              3/3 │      +04|~      │> table of cont                              2/2 │       05|~      │──────────────────────────────────────────────── │      -06|~      │▌ [DEBUG] [st] rg --column --line-number --sma·· │      -07|~      │  doc/fzf-lua-opts.txt:4:1:Table of Contents  ·· │      -08|~      │  doc/fzf-lua.txt:4:1:Table of Contents       ·· │      +06|~      │▌ doc/fzf-lua-opts.txt:4:1:Table of Contents  ·· │      +07|~      │  doc/fzf-lua.txt:4:1:Table of Contents       ·· │      +08|~      │                                                 │       09|~      │                                                 │       10|~      │                                                 │       11|~      │                                                 │