fix(ui): guard terminal writes while suspended

We forgot to guard `beep()` and `flush()`.

Ref: 36ec2b0ae1
Ref: dd76f9087f
Signed-off-by: Michael Vetter <jubalh@iodoru.org>
Fixes: https://github.com/profanity-im/profanity/issues/2162
(cherry picked from commit 5e4b5d313a9e055e039e2feb4efae58b6aaead78)
This commit is contained in:
Michael Vetter
2026-05-19 22:25:43 +02:00
committed by jabber.developer2
parent 72f4f186da
commit 562bd28cff
7 changed files with 38 additions and 7 deletions

View File

@@ -180,6 +180,7 @@ void
ui_suspend(void)
{
inp_suspend();
doupdate();
endwin();
}
@@ -190,6 +191,22 @@ ui_resume(void)
inp_resume();
}
void
ui_beep(void)
{
if (!isendwin()) {
beep();
}
}
void
ui_flash(void)
{
if (!isendwin()) {
flash();
}
}
void
ui_resize(void)
{