fix: Keep remaps safe between reloads

This commit is contained in:
TJ DeVries
2021-03-03 13:26:57 -05:00
parent 3faca0802f
commit 390e5fa9f5

View File

@@ -57,13 +57,14 @@ mappings.default_mappings = config.values.default_mappings or {
}, },
} }
local keymap_store = setmetatable({}, { __TelescopeKeymapStore = __TelescopeKeymapStore or setmetatable({}, {
__index = function(t, k) __index = function(t, k)
rawset(t, k, {}) rawset(t, k, {})
return rawget(t, k) return rawget(t, k)
end end
}) })
local keymap_store = __TelescopeKeymapStore
local _mapping_key_id = 0 local _mapping_key_id = 0
local get_next_id = function() local get_next_id = function()