1
0
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:
Jfreegman
2014-08-10 00:29:18 -04:00
parent e75cf4f3ad
commit 2f12a8d429
2 changed files with 30 additions and 4 deletions

View File

@ -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;
}