mirror of
https://github.com/neovim/neovim.git
synced 2024-12-26 14:11: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
|
end
|
||||||
api.nvim_buf_call(bufnr, function()
|
api.nvim_buf_call(bufnr, function()
|
||||||
local keymap = vim.fn.maparg('K', 'n', false, true)
|
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 })
|
vim.keymap.del('n', 'K', { buffer = bufnr })
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user