Skip to content

Commit 41aa380

Browse files
fix(summary): unpack summary category list (#1637)
* Fix #1624 * Fix #1624 * table.unpack -> unpack * Don't bother with fargs * fix formatting and update the comment --------- Co-authored-by: Ben Lubas <[email protected]>
1 parent 29993a7 commit 41aa380

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lua/neorg/modules/core/summary/module.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,10 @@ module.events.subscribed = {
363363

364364
module.on_event = function(event)
365365
if event.type == "core.neorgcmd.events.summary.summarize" then
366-
module.public.generate_workspace_summary(event.buffer, event.cursor_position, event.content)
366+
-- Remove `data` key, and take only the numerical keys from event.content
367+
-- these numerical keys are the category args passed to the command
368+
local include_categories = { unpack(event.content) }
369+
module.public.generate_workspace_summary(event.buffer, event.cursor_position, include_categories)
367370
end
368371
end
369372

0 commit comments

Comments
 (0)