nvim-notify
nvim-notify copied to clipboard
fix: Resizes notification window on replace
The message parameter is also allowed to be a list of strings. Hence, compared to the previous message, it's viewport dimensions can change both horizontally and vertically.
This sets the existing window width & height to fit the new notification buffer.
To reproduce the issue, run this snippet on the master.
local prev = require("notify")("Somewhat long initial test message", "INFO", { title = "Note" })
require("notify")({ "A multi line", "replacement" }, nil, { replace = prev })
Notice the notification body only contains the string "A multi line". The second "replacement" line is not visible.
And here's the expected result with this change: