changeset 23176:f3087936d594

Treat digits and alphabets as the same class of characters when looking for the beginning of a words. Also treat the all punctuation characters as being of the same class.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 24 May 2008 22:49:44 +0000
parents faad5c0686a4
children 4d8dced30fa2
files finch/libgnt/gntentry.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gntentry.c	Sat May 24 08:34:54 2008 +0000
+++ b/finch/libgnt/gntentry.c	Sat May 24 22:49:44 2008 +0000
@@ -551,10 +551,10 @@
 	return TRUE;
 }
 
-#define SAME(a,b)    ((g_unichar_isalpha(a) && g_unichar_isalpha(b)) || \
-				(g_unichar_isdigit(a) && g_unichar_isdigit(b)) || \
+#define SAME(a,b)    ((g_unichar_isalnum(a) && g_unichar_isalnum(b)) || \
 				(g_unichar_isspace(a) && g_unichar_isspace(b)) || \
-				(g_unichar_iswide(a) && g_unichar_iswide(b)))
+				(g_unichar_iswide(a) && g_unichar_iswide(b)) || \
+				(g_unichar_ispunct(a) && g_unichar_ispunct(b)))
 
 static const char *
 begin_word(const char *text, const char *begin)