@@ -24,16 +24,26 @@ T["files()"] = new_set()
24
24
T [" files()" ][" start and abort" ] = new_set ({ parametrize = { { " <esc>" }, { " <c-c>" } } }, {
25
25
function (key )
26
26
-- 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({
28
29
hidden = false,
29
30
previewer = false,
30
31
cwd_prompt = false,
31
32
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
+ })]==] )
33
40
eq (child .lua_get ([[ _G._fzf_lua_on_create]] ), true )
34
41
child .wait_until (function ()
35
42
return child .lua_get ([[ _G._fzf_load_called]] ) == true
36
43
end )
44
+ child .wait_until (function ()
45
+ return child .lua_get ([[ _G._fzf_postprocess_called]] ) == true
46
+ end )
37
47
-- Ignore last "-- TERMINAL --" line and paths on Windows (separator is "\")
38
48
local screen_opts = { ignore_lines = { 28 }, normalize_paths = helpers .IS_WIN () }
39
49
-- NOTE: we compare screen lines without "attrs"
0 commit comments