mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-19 12:56:46 +00:00
fix(keys): make sure we don't delete the global mapping when executing an ft keymap. See #1241
This commit is contained in:
parent
ababf0dab5
commit
a9b9a4b3a2
1 changed files with 5 additions and 1 deletions
|
@ -163,7 +163,11 @@ end
|
|||
-- mapping when needed
|
||||
---@param keys LazyKeys
|
||||
function M:_del(keys)
|
||||
pcall(vim.keymap.del, keys.mode, keys.lhs)
|
||||
pcall(vim.keymap.del, keys.mode, keys.lhs, {
|
||||
-- NOTE: for buffer-local mappings, we only delete the mapping for the current buffer
|
||||
-- So the mapping could still exist in other buffers
|
||||
buffer = keys.ft and true or nil,
|
||||
})
|
||||
-- make sure to create global mappings when needed
|
||||
-- buffer-local mappings are managed by lazy
|
||||
if not keys.ft then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue