From d58400e230557b92590d810b71459b50b0070905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20H=C3=A5land?= Date: Wed, 21 Apr 2021 14:43:20 +0200 Subject: [PATCH] fix(mark): move early exit after saving --- lua/harpoon/mark.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/harpoon/mark.lua b/lua/harpoon/mark.lua index 82ac15f..a5097e6 100644 --- a/lua/harpoon/mark.lua +++ b/lua/harpoon/mark.lua @@ -9,14 +9,14 @@ local callbacks = {} -- I am trying to avoid over engineering the whole thing. We will likely only -- need one event emitted local function emit_changed() - if not callbacks["changed"] then - return - end - if harpoon.get_global_settings().save_on_change then harpoon.save() end + if not callbacks["changed"] then + return + end + for _, cb in pairs(callbacks) do cb() end