mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-13 17:40:25 +00:00
Merge pull request #395 from willothy/event-moved
feat: introduce move event
This commit is contained in:
commit
0243fdc13f
@ -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
|
||||
|
@ -52,5 +52,6 @@ return {
|
||||
ADD = "ADD",
|
||||
SELECT = "SELECT",
|
||||
REMOVE = "REMOVE",
|
||||
REORDER = "REORDER",
|
||||
},
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user