@@ -24,16 +24,26 @@ T["files()"] = new_set()
2424T [" files()" ][" start and abort" ] = new_set ({ parametrize = { { " <esc>" }, { " <c-c>" } } }, {
2525 function (key )
2626 -- sort output and remove cwd in prompt as will be different on CI
27- child .lua ([[ FzfLua.files({
27+ eq (child .lua_get ([[ _G._fzf_postprocess_called]] ), vim .NIL )
28+ child .lua ([==[ FzfLua.files({
2829 hidden = false,
2930 previewer = false,
3031 cwd_prompt = false,
3132 cmd = "rg --files --sort=path",
32- })]] )
33+ requires_processing = true, -- for __mt_postprocess
34+ __mt_postprocess = [[return function()
35+ local chan_id = vim.fn.sockconnect("pipe", _G._fzf_lua_server, { rpc = true })
36+ vim.rpcrequest(chan_id, "nvim_exec_lua", "_G._fzf_postprocess_called=true", {})
37+ vim.fn.chanclose(chan_id)
38+ end]],
39+ })]==] )
3340 eq (child .lua_get ([[ _G._fzf_lua_on_create]] ), true )
3441 child .wait_until (function ()
3542 return child .lua_get ([[ _G._fzf_load_called]] ) == true
3643 end )
44+ child .wait_until (function ()
45+ return child .lua_get ([[ _G._fzf_postprocess_called]] ) == true
46+ end )
3747 -- Ignore last "-- TERMINAL --" line and paths on Windows (separator is "\")
3848 local screen_opts = { ignore_lines = { 28 }, normalize_paths = helpers .IS_WIN () }
3949 -- NOTE: we compare screen lines without "attrs"
0 commit comments