mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 05:53:02 +01:00
fix
This commit is contained in:
parent
5850e1c333
commit
49655e13a0
@ -296,7 +296,7 @@ static void chat_onKey(ToxWindow *self, Tox *m, wint_t key)
|
|||||||
wmove(self->window, y2 - CURS_Y_OFFSET, 0);
|
wmove(self->window, y2 - CURS_Y_OFFSET, 0);
|
||||||
} else if (key == KEY_END) { /* END key: move cursor to end of line */
|
} else if (key == KEY_END) { /* END key: move cursor to end of line */
|
||||||
ctx->pos = ctx->len;
|
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;
|
int end_x = ctx->len % x2;
|
||||||
wmove(self->window, end_y, end_x);
|
wmove(self->window, end_y, end_x);
|
||||||
} else if (key == KEY_LEFT && ctx->pos > 0) {
|
} else if (key == KEY_LEFT && ctx->pos > 0) {
|
||||||
|
@ -236,7 +236,7 @@ static void groupchat_onKey(ToxWindow *self, Tox *m, wint_t key)
|
|||||||
wmove(self->window, y2 - CURS_Y_OFFSET, 0);
|
wmove(self->window, y2 - CURS_Y_OFFSET, 0);
|
||||||
} else if (key == KEY_END) { /* END key: move cursor to end of line */
|
} else if (key == KEY_END) { /* END key: move cursor to end of line */
|
||||||
ctx->pos = ctx->len;
|
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;
|
int end_x = ctx->len % x2;
|
||||||
wmove(self->window, end_y, end_x);
|
wmove(self->window, end_y, end_x);
|
||||||
} else if (key == KEY_LEFT && ctx->pos > 0) {
|
} else if (key == KEY_LEFT && ctx->pos > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user