# HG changeset patch # User Matti Hamalainen # Date 1225146790 -7200 # Node ID ceec75116aa7d7c6da09ccde3fa670900ce18bb4 # Parent dfe6b835a7455f800f143f0602488754126ccb64 Improved editing commands ctrl+ diff -r dfe6b835a745 -r ceec75116aa7 nnchat.c --- a/nnchat.c Mon Oct 27 01:31:53 2008 +0200 +++ b/nnchat.c Tue Oct 28 00:33:10 2008 +0200 @@ -1075,7 +1075,7 @@ memset(histBuf, 0, sizeof(histBuf)); /* Initialize */ - th_init("NNChat", "Newbie Nudes chat client", "0.6.1", + th_init("NNChat", "Newbie Nudes chat client", "0.6.2", "Written and designed by Anonymous Finnish Guy (C) 2008", "This software is freeware, use and distribute as you wish."); th_verbosityLevel = 0; @@ -1310,16 +1310,16 @@ break; case 0x204: /* ctrl+left */ - editBuf->pos--; - while (editBuf->pos > 0 && !isspace(editBuf->data[editBuf->pos])) + while (editBuf->pos > 0 && isspace(editBuf->data[editBuf->pos - 1])) editBuf->pos--; - if (editBuf->pos < 0) - editBuf->pos = 0; + while (editBuf->pos > 0 && !isspace(editBuf->data[editBuf->pos - 1])) + editBuf->pos--; update = TRUE; break; case 0x206: /* ctrl+right */ - editBuf->pos++; + while (editBuf->pos < editBuf->len && isspace(editBuf->data[editBuf->pos])) + editBuf->pos++; while (editBuf->pos < editBuf->len && !isspace(editBuf->data[editBuf->pos])) editBuf->pos++; if (editBuf->pos > editBuf->len)