Merge pull request #413 from willothy/fix-noencode

fix: check list.config.encode, default save_on_toggle to false
This commit is contained in:
ThePrimeagen 2023-12-12 19:49:30 -07:00 committed by GitHub
commit 8f67088e9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ M.DEFAULT_LIST = DEFAULT_LIST
---@class HarpoonPartialConfigItem ---@class HarpoonPartialConfigItem
---@field select_with_nil? boolean defaults to false ---@field select_with_nil? boolean defaults to false
---@field encode? (fun(list_item: HarpoonListItem): string) ---@field encode? (fun(list_item: HarpoonListItem): string) | boolean
---@field decode? (fun(obj: string): any) ---@field decode? (fun(obj: string): any)
---@field display? (fun(list_item: HarpoonListItem): string) ---@field display? (fun(list_item: HarpoonListItem): string)
---@field select? (fun(list_item?: HarpoonListItem, list: HarpoonList, options: any?): nil) ---@field select? (fun(list_item?: HarpoonListItem, list: HarpoonList, options: any?): nil)
@ -25,7 +25,7 @@ M.DEFAULT_LIST = DEFAULT_LIST
---@field get_root_dir? fun(): string ---@field get_root_dir? fun(): string
---@class HarpoonSettings ---@class HarpoonSettings
---@field save_on_toggle boolean defaults to true ---@field save_on_toggle boolean defaults to false
---@field sync_on_ui_close? boolean ---@field sync_on_ui_close? boolean
---@field key (fun(): string) ---@field key (fun(): string)

View File

@ -86,7 +86,7 @@ end
function Harpoon:sync() function Harpoon:sync()
local key = self.config.settings.key() local key = self.config.settings.key()
self:_for_each_list(function(list, _, list_name) self:_for_each_list(function(list, _, list_name)
if list.encode == false then if list.config.encode == false then
return return
end end