Skip to content

Commit c4572cb

Browse files
committed
fix: correctly pass options to search_on_line function. Fixes #26
1 parent 66c926b commit c4572cb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lua/tiny-glimmer/overwrite/search.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
local M = {}
22

3+
local animation_group = require("tiny-glimmer.namespace").animation_group
4+
35
local function search(opts, search_pattern)
46
local buf = vim.api.nvim_get_current_buf()
57

@@ -28,13 +30,13 @@ local function search(opts, search_pattern)
2830
end)
2931
end
3032

31-
function M.setup()
33+
function M.setup(opts)
3234
vim.api.nvim_create_autocmd("CmdlineLeave", {
3335
group = animation_group,
3436
callback = function()
3537
local cmd_type = vim.fn.getcmdtype()
3638
if cmd_type == "/" or cmd_type == "?" then
37-
M.search_on_line(M.config.overwrite.search)
39+
M.search_on_line(opts)
3840
end
3941
end,
4042
})

0 commit comments

Comments
 (0)