nvim-notify icon indicating copy to clipboard operation
nvim-notify copied to clipboard

fix: Resizes notification window on replace

Open melopilosyan opened this issue 1 year ago • 0 comments

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.

2024-10-03_22-48

And here's the expected result with this change: 2024-10-03_22-51

melopilosyan avatar Oct 03 '24 18:10 melopilosyan