osc: kitty notifications: use body as title, if no title is set

This mirrors kitty's behavior; if the user didn't set a title, but did
set the body/text, use the body as title instead.
This commit is contained in:
Daniel Eklöf 2024-07-19 15:26:08 +02:00
parent b0bf8ca5f7
commit 57af75f988
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

4
osc.c
View file

@ -790,8 +790,8 @@ kitty_notification(struct terminal *term, char *string)
if (done) {
notify_notify(
term,
notif->title != NULL ? notif->title : "",
notif->body != NULL ? notif->body : "",
notif->title != NULL ? notif->title : notif->body,
notif->title != NULL && notif->body != NULL ? notif->body : "",
notif->when, notif->urgency);
tll_foreach(term->kitty_notifications, it) {