Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_text.c 


Log Message:
- selections work with utf8 chars now

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_text.c,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -3 -r1.120 -r1.121
--- ewl_text.c  9 Sep 2006 04:45:48 -0000       1.120
+++ ewl_text.c  9 Sep 2006 04:52:03 -0000       1.121
@@ -3493,6 +3493,7 @@
 {
        Evas_Textblock_Cursor *cur1, *cur2;
        Evas_List *rects;
+       unsigned int byte_idx = 0, byte_len = 0;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
@@ -3514,8 +3515,11 @@
        else
                trig->areas = ecore_list_new();
 
-       cur1 = ewl_text_textblock_cursor_position(t, trig->char_pos);
-       cur2 = ewl_text_textblock_cursor_position(t, trig->char_pos + 
trig->char_len - 1);
+       ewl_text_char_to_byte(t, trig->char_pos, trig->char_len - 1, 
+                                               &byte_idx, &byte_len);
+
+       cur1 = ewl_text_textblock_cursor_position(t, byte_idx);
+       cur2 = ewl_text_textblock_cursor_position(t, byte_idx + byte_len);
 
        /* get all the rectangles and create areas with them */
        rects = evas_textblock_cursor_range_geometry_get(cur1, cur2);



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to