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

allow line editing in prompt window

This commit is contained in:
Jfreegman
2013-12-04 16:14:33 -05:00
parent 424ab7cd10
commit 1517cbb6cb
3 changed files with 47 additions and 30 deletions

View File

@ -292,7 +292,8 @@ static void chat_onKey(ToxWindow *self, Tox *m, wint_t key)
}
else if (key == KEY_DC) { /* DEL key: Remove character at pos */
del_char_buf_frnt(ctx->line, &ctx->pos, &ctx->len);
if (ctx->pos != ctx->len)
del_char_buf_frnt(ctx->line, &ctx->pos, &ctx->len);
}
else if (key == KEY_HOME) { /* HOME key: Move cursor to beginning of line */