From 3292a609c6ec8a5133ca43ad17826e5206062110 Mon Sep 17 00:00:00 2001 From: Radvil Date: Tue, 2 Apr 2024 00:18:39 +0800 Subject: [PATCH] feat(list-api): expose index for later usage - I have a custom append/prepend list where I need to notify the user if current file is already in the list, if it is, I want to hint the use for the exact index, so we can go faster --- lua/harpoon/list.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/harpoon/list.lua b/lua/harpoon/list.lua index 07c19f55..2d5afa14 100644 --- a/lua/harpoon/list.lua +++ b/lua/harpoon/list.lua @@ -126,7 +126,7 @@ function HarpoonList:get_by_display(name) if index == -1 then return nil end - return self.items[index] + return self.items[index], index end --- much inefficiencies. dun care