Skip to content

Commit 1380d7c

Browse files
committed
fix(actions): werid issue when set verbose=1
maybe there're other similar issue, to be discovered ci: fix windows flaky
1 parent 83f7195 commit 1380d7c

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

lua/fzf-lua/utils.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,8 +1625,10 @@ end
16251625
---@return boolean
16261626
function M.jump_to_location(location, offset_encoding, reuse_win)
16271627
if M.__HAS_NVIM_011 then
1628-
return vim.lsp.util.show_document(location, offset_encoding,
1629-
{ reuse_win = reuse_win, focus = true })
1628+
return M.with({ o = { verbose = 0 } }, function()
1629+
return vim.lsp.util.show_document(location, offset_encoding,
1630+
{ reuse_win = reuse_win, focus = true })
1631+
end)
16301632
else
16311633
---@diagnostic disable-next-line: deprecated
16321634
return vim.lsp.util.jump_to_location(location, offset_encoding, reuse_win)

tests/win_spec.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,9 @@ T["win"]["keymap"]["no error"] = new_set({
152152
:totable()
153153
}, {
154154
function(key, _action)
155-
local builtin = child.lua_get [[FzfLua.defaults.keymap.builtin]]
156155
for _, event in ipairs({ "start", "load", "result" }) do
156+
-- add a short delay between calls on Windows to avoid race conditions
157+
if helpers.IS_WIN() then vim.uv.sleep(200) end
157158
helpers.FzfLua.files(child, {
158159
__abort_key = key .. "<c-c>",
159160
__expect_lines = false,

0 commit comments

Comments
 (0)