Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src
Modified Files:
ewl_entry.c
Log Message:
Fix for double character selection on click.
Sanity check the base cursor position.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_entry.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -3 -r1.87 -r1.88
--- ewl_entry.c 23 May 2004 07:57:59 -0000 1.87
+++ ewl_entry.c 24 May 2004 14:56:01 -0000 1.88
@@ -406,11 +406,18 @@
*/
}
- if (ewl_cursor_get_start_position(EWL_CURSOR(e->cursor)) != index)
- index--;
-
index++;
+ if (ewl_cursor_get_start_position(EWL_CURSOR(e->cursor)) != index) {
+ int len, base;
+
+ index--;
+ len = ewl_text_length_get(EWL_TEXT(e->text));
+ base = ewl_cursor_get_base_position(EWL_CURSOR(e->cursor));
+ if (base > len)
+ ewl_cursor_set_base(EWL_CURSOR(e->cursor), --base);
+ }
+
ewl_cursor_select_to(EWL_CURSOR(e->cursor), index);
ewl_widget_configure(w);
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs