mirror of
https://github.com/sadan4/nvim.git
synced 2025-01-18 03:03:29 -05:00
guhhhh
This commit is contained in:
parent
6085fe0a38
commit
6505701cb8
1 changed files with 9 additions and 4 deletions
|
@ -13,12 +13,17 @@ local function hasLHS(arr, lhs)
|
||||||
end
|
end
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
-- returns
|
|
||||||
local function makeOldRightClick()
|
local function makeOldRightClick()
|
||||||
-- try buffer local mappings
|
-- try buffer local mappings
|
||||||
local toRet = hasLHS(vim.api.nvim_buf_get_keymap(0, ""), "<RightMouse>")
|
local toRet = hasLHS(vim.api.nvim_buf_get_keymap(0, ""), "<RightMouse>")
|
||||||
if toRet ~= nil then
|
if toRet == nil then
|
||||||
return toRet
|
elseif toRet.callback ~= nil then
|
||||||
|
return toRet.callback
|
||||||
|
elseif toRet.rhs then
|
||||||
|
return toRet.rhs
|
||||||
|
else
|
||||||
|
error("how")
|
||||||
end
|
end
|
||||||
toRet = hasLHS(vim.api.nvim_get_keymap(""), "<RightMouse>")
|
toRet = hasLHS(vim.api.nvim_get_keymap(""), "<RightMouse>")
|
||||||
if toRet == nil then
|
if toRet == nil then
|
||||||
|
@ -101,7 +106,7 @@ local function removeCloseMap(winHandle)
|
||||||
end
|
end
|
||||||
if openWindowCount == 0 then
|
if openWindowCount == 0 then
|
||||||
vim.api.nvim_del_keymap("", "<RightMouse>")
|
vim.api.nvim_del_keymap("", "<RightMouse>")
|
||||||
vim.keymap.set("n", "<RightMouse>", oldRightClick)
|
vim.keymap.set("n", "<RightMouse>", oldRightClick)
|
||||||
oldRightClick = nil
|
oldRightClick = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue