From ad621a6656434288316141cb2eccf31a2009d958 Mon Sep 17 00:00:00 2001 From: Will Hopkins Date: Fri, 8 Dec 2023 13:11:09 -0800 Subject: [PATCH] refactor: move call to `sync` into `resolve_displayed` --- lua/harpoon/list.lua | 2 ++ lua/harpoon/ui.lua | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/harpoon/list.lua b/lua/harpoon/list.lua index 20a44e3..a9a7cf4 100644 --- a/lua/harpoon/list.lua +++ b/lua/harpoon/list.lua @@ -156,6 +156,8 @@ function HarpoonList:resolve_displayed(displayed) end self.items = new_list + + require("harpoon"):sync() end function HarpoonList:select(index, options) diff --git a/lua/harpoon/ui.lua b/lua/harpoon/ui.lua index 7360d22..9d21c7d 100644 --- a/lua/harpoon/ui.lua +++ b/lua/harpoon/ui.lua @@ -153,7 +153,6 @@ function HarpoonUI:save() local list = Buffer.get_contents(self.bufnr) Logger:log("ui#save", list) self.active_list:resolve_displayed(list) - require("harpoon"):sync() end ---@param settings HarpoonSettings