Skip to content

Commit

Permalink
fix: work with default_workspace and workspace tag
Browse files Browse the repository at this point in the history
Fix #265
  • Loading branch information
delphinus committed Sep 8, 2024
1 parent 3c5b61c commit 12cb6c4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lua/frecency/picker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 12cb6c4

Please sign in to comment.