1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-23 01:53:02 +01:00
This commit is contained in:
Jfreegman 2013-12-01 03:29:12 -05:00
parent 5850e1c333
commit 49655e13a0
2 changed files with 2 additions and 2 deletions

View File

@ -296,7 +296,7 @@ static void chat_onKey(ToxWindow *self, Tox *m, wint_t key)
wmove(self->window, y2 - CURS_Y_OFFSET, 0);
} else if (key == KEY_END) { /* END key: move cursor to end of line */
ctx->pos = ctx->len;
int end_y = (ctx->pos / x2) + y;
int end_y = (ctx->len / x2) + (y2 - CURS_Y_OFFSET);
int end_x = ctx->len % x2;
wmove(self->window, end_y, end_x);
} else if (key == KEY_LEFT && ctx->pos > 0) {

View File

@ -236,7 +236,7 @@ static void groupchat_onKey(ToxWindow *self, Tox *m, wint_t key)
wmove(self->window, y2 - CURS_Y_OFFSET, 0);
} else if (key == KEY_END) { /* END key: move cursor to end of line */
ctx->pos = ctx->len;
int end_y = (ctx->pos / x2) + y;
int end_y = (ctx->len / x2) + (y2 - CURS_Y_OFFSET);
int end_x = ctx->len % x2;
wmove(self->window, end_y, end_x);
} else if (key == KEY_LEFT && ctx->pos > 0) {