mirror of
https://github.com/neovim/neovim.git
synced 2024-12-25 13:45:15 -07:00
fix(lsp): avoid vim.keymap.del error when stopping a client (#29478)
(cherry picked from commit fc9b70826e
)
This commit is contained in:
parent
28a5923aea
commit
2d7aab623e
@ -375,7 +375,7 @@ local function reset_defaults(bufnr)
|
||||
end
|
||||
api.nvim_buf_call(bufnr, function()
|
||||
local keymap = vim.fn.maparg('K', 'n', false, true)
|
||||
if keymap and keymap.callback == vim.lsp.buf.hover then
|
||||
if keymap and keymap.callback == vim.lsp.buf.hover and keymap.buffer == 1 then
|
||||
vim.keymap.del('n', 'K', { buffer = bufnr })
|
||||
end
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user