changeset 14094:d0f3eba2717c

[gaim-migrate @ 16723] Tab-completion should be case-insensitive. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 12 Aug 2006 15:17:14 +0000
parents b9e9938b1afa
children 3b871b67556d
files console/libgnt/gntentry.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/console/libgnt/gntentry.c	Sat Aug 12 11:15:23 2006 +0000
+++ b/console/libgnt/gntentry.c	Sat Aug 12 15:17:14 2006 +0000
@@ -80,7 +80,7 @@
 	for (count = 0, iter = entry->suggests; iter; iter = iter->next)
 	{
 		const char *text = iter->data;
-		if (strncmp(suggest, text, len) == 0 && strlen(text) >= len)
+		if (g_ascii_strncasecmp(suggest, text, len) == 0 && strlen(text) >= len)
 		{
 			gnt_tree_add_row_after(GNT_TREE(entry->ddown), (gpointer)text,
 					gnt_tree_create_row(GNT_TREE(entry->ddown), text),
@@ -258,10 +258,9 @@
 			{
 				char *s = get_beginning_of_word(entry);
 				char *iter = text;
-				while (*s == *iter)
+				while (toupper(*s) == toupper(*iter))
 				{
-					s++;
-					iter++;
+					*s++ = *iter++;
 				}
 				gnt_entry_key_pressed(widget, iter);
 			}