Skip to content

Commit 8f2abd7

Browse files
phanenibhagwan
authored andcommitted
fix(command_history): error on resume coroutine.wrap content
1 parent 98c0e00 commit 8f2abd7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lua/fzf-lua/providers/nvim.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ local history = function(opts, str)
116116
local dr = opts.reverse_list and 1 or -1
117117
local bulk = 500
118118
local from, to, delta = dr, dr * histnr, dr * bulk
119-
local content = coroutine.wrap(function(cb)
119+
local content = function(cb)
120120
local co = coroutine.running()
121121
for i = from, to, delta do
122122
vim.schedule(function()
@@ -136,8 +136,8 @@ local history = function(opts, str)
136136
coroutine.yield()
137137
end
138138
cb(nil)
139-
end)
140-
core.fzf_exec(content, opts)
139+
end
140+
core.fzf_exec(function(cb) coroutine.wrap(content)(cb) end, opts)
141141
end
142142

143143
---@param opts fzf-lua.config.CommandHistory|{}?

0 commit comments

Comments
 (0)