We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 83f7195 commit e442bb2Copy full SHA for e442bb2
1 file changed
lua/fzf-lua/path.lua
@@ -685,7 +685,12 @@ function M.keymap_to_entry(str)
685
if vmap.callback then
686
local info = debug.getinfo(vmap.callback)
687
if info and info.source then
688
- return { path = info.source:gsub("^@", ""), line = info.linedefined }
+ local source = info.source:gsub("^@", "")
689
+ -- https://github.com/neovim/neovim/blob/64d55b74d83d566975e269bed0810d9008119ddf/src/nvim/lua/executor.c#L671-L680
690
+ if source:match("vim/") and package.preload[source:gsub("%.lua$", ""):gsub("/", ".")] then
691
+ source = vim.env.VIMRUNTIME .. "/lua/" .. source
692
+ end
693
+ return { path = source, line = info.linedefined }
694
end
695
696
local cmd = ("verb %smap %s"):format(mode, keymap)
0 commit comments