comparison nnchat.c @ 165:f2f0b6f9281b

Dont set 'again' flag in tab completion function if the new and old pattern do not match exactly (apart from case).
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 04 Nov 2010 16:10:11 +0200
parents cc1cc49d26f0
children 2e4850ece456
comparison
equal deleted inserted replaced
164:701c54a45466 165:f2f0b6f9281b
754 if (str[endPos] == optNickSep) 754 if (str[endPos] == optNickSep)
755 return FALSE; 755 return FALSE;
756 756
757 /* Get pattern, check if it matches previous pattern and set 'again' flag */ 757 /* Get pattern, check if it matches previous pattern and set 'again' flag */
758 npattern = nn_editbuf_get_string(buf, startPos, endPos); 758 npattern = nn_editbuf_get_string(buf, startPos, endPos);
759 if (pattern && npattern && strncasecmp(npattern, pattern, strlen(pattern)) == 0) 759 if (pattern && npattern && strcasecmp(npattern, pattern) == 0)
760 again = TRUE; 760 again = TRUE;
761 th_free(pattern); pattern = npattern; 761 th_free(pattern); pattern = npattern;
762 if (!again) { 762 if (!again) {
763 th_free(previous); 763 th_free(previous);
764 previous = NULL; 764 previous = NULL;