Skip to content

Commit 940ffbf

Browse files
committed
fix(live_grep): when winopts is function (#2493)
1 parent b8d1356 commit 940ffbf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lua/fzf-lua/providers/grep.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ local function normalize_live_grep_opts(opts)
6363
-- disable treesitter as it collides with cmd regex highlighting
6464
opts = opts or {}
6565
opts._treesitter = false
66-
if opts.winopts then opts.winopts.treesitter = nil end
66+
utils.map_set(opts, "winopts.treesitter", nil)
6767

6868
---@type fzf-lua.config.Grep
6969
opts = config.normalize_opts(opts, "grep")

lua/fzf-lua/utils.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ function M.map_set(m, k, v)
539539
if i == #keys then
540540
map[key] = v
541541
else
542+
if type(map[key]) == "function" then break end
542543
map[key] = type(map[key]) == "table" and map[key] or {}
543544
map = map[key]
544545
end

0 commit comments

Comments
 (0)