1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-12-07 04:36:35 +01:00

implement word deletion via ^W

This commit is contained in:
Jfreegman
2014-10-05 23:12:58 -04:00
parent e5d45fdf1d
commit 43552161f9
5 changed files with 57 additions and 3 deletions

View File

@@ -482,9 +482,9 @@ static void groupchat_onDraw(ToxWindow *self, Tox *m)
/* truncate nick to fit in side panel without modifying list */
char tmpnck[TOX_MAX_NAME_LENGTH];
memcpy(tmpnck, &groupchats[self->num].peer_names[peer * N], SIDEBAR_WIDTH - 2);
int len = SIDEBAR_WIDTH - 2;
tmpnck[len] = '\0';
int maxlen = SIDEBAR_WIDTH - 2;
memcpy(tmpnck, &groupchats[self->num].peer_names[peer * N], maxlen);
tmpnck[maxlen] = '\0';
wprintw(ctx->sidebar, "%s\n", tmpnck);
}