From f67baca08423a6fd00167801a54db38e0b878063 Mon Sep 17 00:00:00 2001 From: JINNOUCHI Yasushi Date: Sun, 8 Sep 2024 19:41:16 +0900 Subject: [PATCH] fix: work with default_workspace and workspace tag (#267) Fix #265 --- lua/frecency/picker.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/frecency/picker.lua b/lua/frecency/picker.lua index 9cfafda..1a01e2b 100644 --- a/lua/frecency/picker.lua +++ b/lua/frecency/picker.lua @@ -167,7 +167,6 @@ end ---@param tag? string ---@return string? function Picker:get_workspace(cwd, tag) - tag = tag or config.default_workspace if not tag then return nil elseif config.workspaces[tag] then @@ -197,7 +196,7 @@ function Picker:on_input_filter_cb(picker_opts) local start, finish, tag = prompt:find(self.workspace_tag_regex) local opts = { prompt = start and prompt:sub(finish + 1) or prompt } if prompt == "" then - workspace = self:get_workspace(picker_opts.cwd, self.config.initial_workspace_tag) + workspace = self:get_workspace(picker_opts.cwd, self.config.initial_workspace_tag or config.default_workspace) else workspace = self:get_workspace(picker_opts.cwd, tag) or self.workspace end