Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Resizes notification window on replace #297

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

melopilosyan
Copy link

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

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant