Skip to content

check for valid window before resizing (#306)#324

Merged
lceWolf merged 1 commit intoCivitasv:masterfrom
lceWolf:fix_notification_invalid_window_error
Jun 5, 2025
Merged

check for valid window before resizing (#306)#324
lceWolf merged 1 commit intoCivitasv:masterfrom
lceWolf:fix_notification_invalid_window_error

Conversation

@lceWolf
Copy link
Copy Markdown
Collaborator

@lceWolf lceWolf commented Jun 5, 2025

when calling notify on a notification instance quickly after the window has been dismissed, the on_close callback was not yet called as it is handled asynchronously by vim-notify. Yet, the window is gone and its winID is not valid anymore. Since the on_open callback is also handled async, the winID has not been replaced by then. Skipping the resize should be fine as the new notification should be displayed with the correct size to begin with

when calling `notify` on a notification instance quickly after the
window has been dismissed, the on_close callback was not yet called as
it is handled asynchronously by vim-notify. Yet, the window is gone and
its winID is not valid anymore. Since the on_open callback is also
handled async, the winID has not been replaced by then. Skipping the
resize should be fine as the new notification should be displayed with
the correct size to begin with
@lceWolf lceWolf force-pushed the fix_notification_invalid_window_error branch from 2ba94c5 to cfe2f8b Compare June 5, 2025 20:04
@lceWolf lceWolf merged commit 83de79f into Civitasv:master Jun 5, 2025
1 of 2 checks passed
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