This patch (against 2004-05-03 CVS snapshot) fixes cursor movement bug
in GtkEntry, in which cursor cannot move pass the last grapheme of the
line when there are combining marks.

Theppitak Karoonboonyanan.

diff -Nuar gtk+/gtk/gtkentry.c gtk+-right/gtk/gtkentry.c
--- gtk+/gtk/gtkentry.c	2004-05-03 19:37:52.000000000 +0700
+++ gtk+-right/gtk/gtkentry.c	2004-05-03 19:52:05.000000000 +0700
@@ -3226,13 +3226,13 @@
 	  count++;
 	}
 
-      if (new_index < 0 || new_index == G_MAXINT)
-	break;
-
-      index = new_index;
+      if (new_index < 0)
+        index = 0;
+      else if (new_index != G_MAXINT)
+        index = new_index;
       
       while (new_trailing--)
-	index = g_utf8_next_char (text + new_index) - text;
+	index = g_utf8_next_char (text + index) - text;
     }
   
   return g_utf8_pointer_to_offset (text, text + index);
