mirror of
https://github.com/Tha14/toxic.git
synced 2025-06-29 19:36:46 +02:00
prevent statusmessage from wrapping on prompt screen
This commit is contained in:
@ -943,10 +943,11 @@ static void chat_onDraw(ToxWindow *self, Tox *m)
|
||||
self->x = x2;
|
||||
|
||||
/* Truncate note if it doesn't fit in statusbar */
|
||||
uint16_t maxlen = x2 - getcurx(statusbar->topline) - (KEY_IDENT_DIGITS * 2) - 7;
|
||||
uint16_t maxlen = x2 - getcurx(statusbar->topline) - (KEY_IDENT_DIGITS * 2) - 6;
|
||||
|
||||
if (statusbar->statusmsg_len > maxlen) {
|
||||
statusbar->statusmsg[maxlen] = '\0';
|
||||
statusbar->statusmsg[maxlen - 3] = '\0';
|
||||
strcat(statusbar->statusmsg, "...");
|
||||
statusbar->statusmsg_len = maxlen;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user