Skip to content

Commit

Permalink
hotfix: should have been there but wasnt
Browse files Browse the repository at this point in the history
  • Loading branch information
Conni2461 committed Aug 21, 2021
1 parent e46ef8f commit 8381a21
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lua/telescope/builtin/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,14 @@ local apply_config = function(mod)
for k, v in pairs(mod) do
mod[k] = function(opts)
opts = opts or {}
local defaults = {}

local pconf = pickers_conf[k] or {}
if pconf.theme then
defaults = require("telescope.themes")["get_" .. pconf.theme](pconf)
end
local defaults = (function()
if pconf.theme then
return require("telescope.themes")["get_" .. pconf.theme](pconf)
end
return vim.deepcopy(pconf)
end)()

if pconf.mappings then
defaults.attach_mappings = function(_, map)
for mode, tbl in pairs(pconf.mappings) do
Expand Down

0 comments on commit 8381a21

Please sign in to comment.