1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-01 16:16:46 +02:00

allow friendlist to scroll up and down if friends overflow the window

This commit is contained in:
Jfreegman
2013-12-02 18:23:04 -05:00
parent 81c48f7b2b
commit 7a89229375
5 changed files with 19 additions and 12 deletions

View File

@ -335,7 +335,7 @@ static void chat_onKey(ToxWindow *self, Tox *m, wint_t key)
#endif
{ /* prevents buffer overflows and strange behaviour when cursor goes past the window */
if ( (ctx->len < MAX_STR_SIZE-1) && (ctx->len < (x2 * (CHATBOX_HEIGHT - 1)-1)) ) {
add_char_to_buf(key, ctx->line, &ctx->pos, &ctx->len);
add_char_to_buf(ctx->line, &ctx->pos, &ctx->len, key);
if (x == x2-1)
wmove(self->window, y+1, 0);