1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-29 19:36:46 +02:00

move to page end after pressing return

This commit is contained in:
Jfreegman
2014-09-25 00:42:08 -04:00
parent 00cccad22c
commit 3a176e1cab
5 changed files with 13 additions and 7 deletions

View File

@ -928,6 +928,7 @@ static void chat_onKey(ToxWindow *self, Tox *m, wint_t key, bool ltr)
wclear(ctx->linewin);
wmove(self->window, y2 - CURS_Y_OFFSET, 0);
line_info_reset_start(self, ctx->hst);
reset_buf(ctx);
}
@ -1013,7 +1014,7 @@ 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) - 3;
uint16_t maxlen = x2 - getcurx(statusbar->topline) - (KEY_IDENT_DIGITS * 2) - 6;
if (statusbar->statusmsg_len > maxlen) {
statusbar->statusmsg[maxlen - 3] = '\0';