-
-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Publish event when heading is toggled with <prefix>*
- Loading branch information
1 parent
42a4ccf
commit 8b92e84
Showing
3 changed files
with
50 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
---@class OrgHeadingToggledEvent: OrgEvent | ||
---@field headline? OrgHeadline | ||
---@field line? number | ||
---@field action 'line_to_headline' | 'headline_to_line' | 'line_to_child_headline' | ||
local HeadingToggledEvent = { | ||
type = 'orgmode.heading_toggled', | ||
} | ||
HeadingToggledEvent.__index = HeadingToggledEvent | ||
|
||
---@param line number | ||
---@param action 'line_to_headline' | 'headline_to_line' | 'line_to_child_headline' | ||
---@param headline? OrgHeadline | ||
function HeadingToggledEvent:new(line, action, headline) | ||
return setmetatable({ | ||
line = line, | ||
headline = headline, | ||
action = action, | ||
}, self) | ||
end | ||
|
||
return HeadingToggledEvent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters