Skip to content

Commit 4ef4c13

Browse files
committed
feat(stages): pass buffer
See #99
1 parent c6ca279 commit 4ef4c13

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ The function is given a state table that contains the following keys:
233233
- `width` Width of the message buffer
234234
- `height` Height of the message buffer
235235
- `open_windows: integer[]` List of all window IDs currently showing messages
236+
- `buffer: integer` The buffer containing the rendered notification message.
236237

237238
If a notification can't be shown at the moment the function should return `nil`.
238239

lua/notify/windows/init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ function WindowAnimator:get_goals()
216216
for win, win_stage in pairs(self.win_stages) do
217217
local notif_buf = self.notif_bufs[win]
218218
local win_goals = self.stages[win_stage]({
219+
buffer = notif_buf:buffer(),
219220
message = self._get_dimensions(notif_buf),
220221
open_windows = open_windows,
221222
}, win)

0 commit comments

Comments
 (0)