Skip to content

Commit

Permalink
fix: if fetching task by tags, ignore tasks with no tags (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Jan 7, 2024
1 parent ae02bd2 commit d3f9a02
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions lua/overseer/template/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,14 @@ local clear_cache_autocmd

local hooks = {}

---@param condition? overseer.SearchCondition
---@param tags? string[]
---@param search overseer.SearchParams
---@param match_tags boolean
---@return boolean
---@return nil|string
---@param condition? overseer.SearchCondition Template conditions
---@param tags? string[] Template tags
---@param search overseer.SearchParams Search parameters
---@param match_tags boolean Require that tags match
---@return boolean match
---@return nil|string reason
local function condition_matches(condition, tags, search, match_tags)
if not condition then
return true
end
condition = condition or {}
if condition.filetype then
local search_fts = vim.split(search.filetype, ".", { plain = true })
local any_ft_match = false
Expand Down

0 comments on commit d3f9a02

Please sign in to comment.