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

better fix for trailing spaces issue

This commit is contained in:
Jfreegman
2014-06-03 20:35:00 -04:00
parent 789c491c1e
commit 97dedd32fb
6 changed files with 31 additions and 16 deletions

View File

@ -687,6 +687,8 @@ static void chat_onKey(ToxWindow *self, Tox *m, wint_t key, bool ltr)
/* RETURN key: Execute command or print line */
else if (key == '\n') {
rm_trailing_spaces_buf(ctx->line, &ctx->pos, &ctx->len);
uint8_t line[MAX_STR_SIZE];
if (wcs_to_mbs_buf(line, ctx->line, MAX_STR_SIZE) == -1)