mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-12 23:23:01 +01:00
fix a couple bugs
This commit is contained in:
parent
d04f5fa102
commit
feefecb2ac
@ -396,7 +396,7 @@ static void chat_onKey(ToxWindow *self, Tox *m, wint_t key)
|
||||
mv_curs_end(self->window, ctx->len, y2, x2);
|
||||
}
|
||||
|
||||
else if (key == '\t') { /* TAB key: command */
|
||||
else if (key == '\t') { /* TAB key: completes command */
|
||||
if (ctx->len > 1 && ctx->line[0] == '/') {
|
||||
int diff = complete_line(ctx->line, &ctx->pos, &ctx->len, chat_cmd_list, AC_NUM_CHAT_COMMANDS,
|
||||
MAX_CMDNAME_SIZE);
|
||||
|
@ -393,7 +393,8 @@ static void groupchat_onKey(ToxWindow *self, Tox *m, wint_t key)
|
||||
else if (key == '\t') { /* TAB key: completes peer name */
|
||||
if (ctx->len > 0) {
|
||||
int diff;
|
||||
if (ctx->line[0] != '/')
|
||||
|
||||
if ((ctx->line[0] != '/') || (ctx->line[1] == 'm' && ctx->line[2] == 'e'))
|
||||
diff = complete_line(ctx->line, &ctx->pos, &ctx->len, groupchats[self->num].peer_names,
|
||||
groupchats[self->num].num_peers, TOX_MAX_NAME_LENGTH);
|
||||
else
|
||||
|
@ -130,9 +130,8 @@ void fetch_hist_item(wchar_t *buf, size_t *pos, size_t *len, wchar_t (*hst)[MAX_
|
||||
beep();
|
||||
}
|
||||
} else {
|
||||
if (++(*hst_pos) > hst_tot) {
|
||||
if (++(*hst_pos) >= hst_tot) {
|
||||
--(*hst_pos);
|
||||
beep();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ struct StatusBar {
|
||||
bool is_online;
|
||||
};
|
||||
|
||||
#define MAX_LINE_HIST 128
|
||||
#define MAX_LINE_HIST 10
|
||||
|
||||
/* chat and groupchat window/buffer holder */
|
||||
struct ChatContext {
|
||||
|
Loading…
Reference in New Issue
Block a user