summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/telescope/actions/utils.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/lua/telescope/actions/utils.lua b/lua/telescope/actions/utils.lua
index 749b79b..8018d64 100644
--- a/lua/telescope/actions/utils.lua
+++ b/lua/telescope/actions/utils.lua
@@ -96,8 +96,11 @@ function utils.get_registered_mappings(prompt_bufnr)
for _, mode in ipairs { "n", "i" } do
local mode_mappings = vim.api.nvim_buf_get_keymap(prompt_bufnr, mode)
for _, mapping in ipairs(mode_mappings) do
- local funcid = findnth(mapping.rhs, 2)
- table.insert(ret, { mode = mode, keybind = mapping.lhs, func = __TelescopeKeymapStore[prompt_bufnr][funcid] })
+ -- ensure only telescope mappings
+ if mapping.rhs and string.find(mapping.rhs, [[require%('telescope.mappings'%).execute_keymap]]) then
+ local funcid = findnth(mapping.rhs, 2)
+ table.insert(ret, { mode = mode, keybind = mapping.lhs, func = __TelescopeKeymapStore[prompt_bufnr][funcid] })
+ end
end
end
return ret