Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lua/fzf-lua/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1071,8 +1071,10 @@ M.defaults.command_history = {
}

M.defaults.search_history = {
fzf_opts = { ["--tiebreak"] = "index", ["--no-multi"] = true },
actions = {
fzf_opts = { ["--tiebreak"] = "index", ["--no-multi"] = true },
_treesitter = function(line) return "", nil, line, "regex" end,
fzf_colors = { ["hl"] = "-1:reverse", ["hl+"] = "-1:reverse" },
actions = {
["enter"] = actions.search_cr,
["ctrl-e"] = actions.search,
},
Expand Down
3 changes: 2 additions & 1 deletion lua/fzf-lua/providers/nvim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ M.commands = function(opts)
core.fzf_exec(entries, opts)
end

---@param str ":"|"/"
local history = function(opts, str)
local histnr = vim.fn.histnr(str)
local dr = opts.reverse_list and 1 or -1
Expand All @@ -119,7 +120,7 @@ local history = function(opts, str)
for j = 0, delta - dr, dr do
local index = i + j
if dr > 0 and index <= to or dr < 0 and index >= to then
cb(vim.fn.histget(":", index), function()
cb(vim.fn.histget(str, index), function()
count = count - 1
if count == 0 then coroutine.resume(co) end
end)
Expand Down