Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/etox

Dir     : e17/libs/etox/src


Modified Files:
        etox_line.c 


Log Message:
Avoid some nasty loop conditions when wrapping "unwrappable" lines.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/etox/src/etox_line.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- etox_line.c 17 Feb 2004 21:58:20 -0000      1.31
+++ etox_line.c 18 Feb 2004 19:17:07 -0000      1.32
@@ -417,8 +417,8 @@
                index = estyle_text_at_position(bit, et->x + et->w, y + (h / 2),
                                NULL, NULL, NULL, NULL);
 
-       /* if we have an index and there is more than one char on the line */
-       if (index != -1){
+       /* Adjust the index to find the actual character we want to wrap. */
+       if (index > 0) {
                char *tmp;
 
                tmp = estyle_get_text(bit);
@@ -433,7 +433,10 @@
                while (index < strlen(tmp) && isspace(tmp[index]))
                        index++;
                FREE(tmp);
+       }
 
+       /* Wrap if we've found a reasonable position */
+       if (index > 0) {
                etox_line_split(line, bit, index);
 
                ll = evas_list_find_list(et->lines, line);




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to