Skip to content

Commit

Permalink
Support session
Browse files Browse the repository at this point in the history
  • Loading branch information
hrsh7th committed Nov 3, 2021
1 parent a881adb commit 68a37a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/cmp/utils/keymap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ keymap.listen = function(mode, lhs, callback)
lhs = keymap.normalize(keymap.to_keymap(lhs))

local existing = keymap.get_mapping(mode, lhs)
if string.match(existing.rhs, vim.pesc('v:lua.cmp.utils.keymap')) then
local id = string.match(existing.rhs, 'v:lua%.cmp%.utils%.keymap%.set_map%((%d+)%)')
if id and keymap.set_map.callbacks[tonumber(id, 10)] then
return
end

Expand Down

0 comments on commit 68a37a6

Please sign in to comment.