Skip to content

Commit 7ddbdc0

Browse files
Match by category (#494)
* Makes category searchable in agenda match searches * Switches from keep to force
1 parent 458fac9 commit 7ddbdc0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lua/orgmode/parser/file.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,14 @@ function File:apply_search(search, todo_only)
201201
end
202202

203203
return vim.tbl_filter(function(item)
204+
---@cast item Section
204205
if item:is_archived() or (todo_only and not item:is_todo()) then
205206
return false
206207
end
207208
return search:check({
208-
props = item.properties.items,
209+
props = vim.tbl_extend('keep', {}, item.properties.items, {
210+
category = item.category,
211+
}),
209212
tags = item.tags,
210213
todo = item.todo_keyword.value,
211214
})

0 commit comments

Comments
 (0)