Skip to content

Commit

Permalink
fix(summary): unpack summary category list (#1637)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
OmegaLambda1998 and benlubas authored Jan 22, 2025
1 parent 29993a7 commit 41aa380
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/neorg/modules/core/summary/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,10 @@ module.events.subscribed = {

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

Expand Down

0 comments on commit 41aa380

Please sign in to comment.