Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        ewl_entry.c 


Log Message:
Fix from caro for some entry behavior oddities.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_entry.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -3 -r1.91 -r1.92
--- ewl_entry.c 27 May 2004 20:15:16 -0000      1.91
+++ ewl_entry.c 7 Jun 2004 18:53:21 -0000       1.92
@@ -460,7 +460,7 @@
        if (ev->clicks == 2) {
                bp = ewl_cursor_get_base_position(EWL_CURSOR(e->cursor));
 
-       s = ewl_entry_get_text(e);
+               s = ewl_entry_get_text(e);
       
                if (s[bp-1] != ' ') {
                        if (s[bp] != ' ') {
@@ -469,9 +469,16 @@
                                        while ((index-->0) && (s[index] != ' ')){}
                                        ewl_cursor_set_base(EWL_CURSOR(e->cursor), 
index+2);
                                        index = bp-1;
-                                       while ((index++<len) && (s[index] != ' ')){}
+                                       while ((index++<len) && (s[index] != ' ')){}
+                                       if (index > len) index--;
                                        ewl_cursor_select_to(EWL_CURSOR(e->cursor), 
index);
                                }
+                               else {
+                                       index = bp-1;
+                                       while ((index-->0) && (s[index] != ' ')){}
+                                       ewl_cursor_set_base(EWL_CURSOR(e->cursor), 
index+2);
+                                       ewl_cursor_select_to(EWL_CURSOR(e->cursor), 
len);
+                               }
                        }
                        else
                        {




-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to