diff --git a/lua/harpoon/list.lua b/lua/harpoon/list.lua index 2e0130d..ef9dca8 100644 --- a/lua/harpoon/list.lua +++ b/lua/harpoon/list.lua @@ -149,6 +149,12 @@ function HarpoonList:resolve_displayed(displayed) { list = self, item = new_list[i], idx = i } ) else + if index ~= i then + Listeners.listeners:emit( + Listeners.event_names.REORDER, + { list = self, item = self.items[index], idx = i } + ) + end local index_in_new_list = index_of(new_list, self.items[index], self.config) if index_in_new_list == -1 then diff --git a/lua/harpoon/listeners.lua b/lua/harpoon/listeners.lua index c079b63..23d7bcc 100644 --- a/lua/harpoon/listeners.lua +++ b/lua/harpoon/listeners.lua @@ -52,5 +52,6 @@ return { ADD = "ADD", SELECT = "SELECT", REMOVE = "REMOVE", + REORDER = "REORDER", }, }