mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-14 01:50:27 +00:00
feat: select navigation
This commit is contained in:
parent
5ec7f9200e
commit
5471588300
@ -1,4 +1,5 @@
|
||||
local Listeners = require("harpoon2.listeners")
|
||||
local Buffer = require("harpoon2.buffer")
|
||||
|
||||
local function index_of(items, element, config)
|
||||
local equals = config and config.equals
|
||||
|
@ -102,6 +102,12 @@ end
|
||||
|
||||
function HarpoonUI:select_menu_item()
|
||||
local idx = vim.fn.line(".")
|
||||
|
||||
-- must first save any updates potentially made to the list before
|
||||
-- navigating
|
||||
local list = Buffer.get_contents(self.bufnr)
|
||||
self.active_list:resolve_displayed(list)
|
||||
|
||||
self.active_list:select(idx)
|
||||
self:close_menu()
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user