1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-14 15:19:12 +08:00

feat(flygrep): add move_cursor function

This commit is contained in:
wsdjeg 2022-10-07 21:55:36 +08:00
parent f9c64797a0
commit b2ed298955

View File

@ -315,6 +315,14 @@ local function open_item_in_tab()
open_item('tabedit')
end
local function move_cursor()
if vim.v.mouse_winid == flygrep_win_id then
vim.api.nvim_win_set_cursor(flygrep_win_id, {vim.v.mouse_lnum, 0})
end
mpt._build_prompt()
end
mpt._function_key = {
[Key.t('<Tab>')] = next_item,
[Key.t('<C-j>')] = next_item,