comparison nnchat.c @ 163:cc1cc49d26f0

Make tab username completion debug messages clearer.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 04 Nov 2010 15:55:37 +0200
parents e59cec397811
children f2f0b6f9281b
comparison
equal deleted inserted replaced
162:e59cec397811 163:cc1cc49d26f0
765 } 765 }
766 mode = 2; 766 mode = 2;
767 } 767 }
768 768
769 if (optDebug) 769 if (optDebug)
770 printMsg("%d, %d <-> %d : '%s' (%d, %d)\n", startPos, endPos, buf->len, pattern, mode, again); 770 printMsg("sPos=%d, ePos=%d <-> bLen=%d : pat='%s' (mode=%d, again=%s)\n",
771 startPos, endPos, buf->len, pattern, mode, again ? "yes" : "no");
771 772
772 if (pattern) { 773 if (pattern) {
773 nn_user_t *user = nn_user_match(nnUsers, pattern, previous, again); 774 nn_user_t *user = nn_user_match(nnUsers, pattern, previous, again);
774 775
775 if (user) { 776 if (user) {
776 int i; 777 int i;
777 char *c = user->name; 778 char *c = user->name;
778 if (optDebug) 779 if (optDebug)
779 printMsg("match '%s' / prev '%s'\n", user->name, previous); 780 printMsg("match='%s' / prev='%s'\n", user->name, previous);
780 781
781 for (i = startPos; i <= endPos; i++) 782 for (i = startPos; i <= endPos; i++)
782 nn_editbuf_delete(buf, startPos); 783 nn_editbuf_delete(buf, startPos);
783 784
784 for (i = startPos; *c; i++, c++) 785 for (i = startPos; *c; i++, c++)