mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-26 23:03:27 +01:00
format consistency
This commit is contained in:
parent
b1b2cc44df
commit
f67cc479ec
@ -229,17 +229,25 @@ static void groupchat_onKey(ToxWindow *self, Tox *m, wint_t key)
|
||||
else
|
||||
wmove(self->window, y, x-1);
|
||||
}
|
||||
} else if (key == KEY_DC) { /* DEL key: Remove character at pos */
|
||||
}
|
||||
|
||||
else if (key == KEY_DC) { /* DEL key: Remove character at pos */
|
||||
del_char_buf_frnt(ctx->line, &ctx->pos, &ctx->len);
|
||||
} else if (key == KEY_HOME) { /* HOME key: Move cursor to beginning of line */
|
||||
}
|
||||
|
||||
else if (key == KEY_HOME) { /* HOME key: Move cursor to beginning of line */
|
||||
ctx->pos = 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;
|
||||
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) {
|
||||
}
|
||||
|
||||
else if (key == KEY_LEFT) {
|
||||
if (ctx->pos > 0) {
|
||||
--ctx->pos;
|
||||
|
||||
@ -248,7 +256,9 @@ static void groupchat_onKey(ToxWindow *self, Tox *m, wint_t key)
|
||||
else
|
||||
wmove(self->window, y, x-1);
|
||||
}
|
||||
} else if (key == KEY_RIGHT) {
|
||||
}
|
||||
|
||||
else if (key == KEY_RIGHT) {
|
||||
if (ctx->pos < ctx->len) {
|
||||
++ctx->pos;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user