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

refactor chat window input code, misc fixes

This commit is contained in:
Jfreegman
2014-06-26 02:33:09 -04:00
parent 6c38e72654
commit 09badaa9ee
12 changed files with 449 additions and 404 deletions

View File

@ -149,7 +149,7 @@ void add_line_to_hist(ChatContext *ctx)
resets line if at end of history */
void fetch_hist_item(ChatContext *ctx, int key_dir)
{
if (key_dir == MOVE_UP) {
if (key_dir == KEY_UP) {
if (--ctx->hst_pos < 0) {
ctx->hst_pos = 0;
beep();
@ -247,8 +247,8 @@ int complete_line(ChatContext *ctx, const void *list, int n_items, int size)
wcscpy(ctx->line, newbuf);
ctx->len += (size_t) diff;
ctx->pos += (size_t) diff;
ctx->len += diff;
ctx->pos += diff;
return diff;
}