mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-14 01:50:27 +00:00
Merge pull request #59 from asbjornhaland/save
fix(mark): move early exit after saving
This commit is contained in:
commit
8b785eafe5
@ -9,14 +9,14 @@ local callbacks = {}
|
|||||||
-- I am trying to avoid over engineering the whole thing. We will likely only
|
-- I am trying to avoid over engineering the whole thing. We will likely only
|
||||||
-- need one event emitted
|
-- need one event emitted
|
||||||
local function emit_changed()
|
local function emit_changed()
|
||||||
if not callbacks["changed"] then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if harpoon.get_global_settings().save_on_change then
|
if harpoon.get_global_settings().save_on_change then
|
||||||
harpoon.save()
|
harpoon.save()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not callbacks["changed"] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
for _, cb in pairs(callbacks) do
|
for _, cb in pairs(callbacks) do
|
||||||
cb()
|
cb()
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user