Enlightenment CVS committal
Author : dj2
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src
Modified Files:
ewl_entry.c
Log Message:
fixup the delete left/right a bit
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_entry.c,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -3 -r1.114 -r1.115
--- ewl_entry.c 13 Oct 2004 04:32:32 -0000 1.114
+++ ewl_entry.c 13 Oct 2004 14:24:45 -0000 1.115
@@ -676,10 +676,16 @@
pos = c_pos;
if (l) {
- ewl_entry_index_geometry_map(e, pos, &cx, &cy, &cw, &ch);
+ /*
+ * if we are at the end of the text, dont grab the
+ * width/height as they will not make sense
+ */
if (pos != c_pos)
ewl_entry_index_geometry_map(e, c_pos, &cx, &cy,
- NULL, NULL);
+ NULL, NULL);
+ else
+ ewl_entry_index_geometry_map(e, pos, &cx, &cy, &cw,
+ &ch);
}
else
ewl_object_current_geometry_get(EWL_OBJECT(w), &cx, &cy, &cw,
@@ -1220,10 +1226,10 @@
sp--;
if (sp < 0) return;
- if (ep == 0) ep = 1;
- op = ewl_entry_op_text_delete_new(e, sp, ep);
+ op = ewl_entry_op_text_delete_new(e, sp, ep - sp);
ecore_dlist_append(e->ops, op);
+
if (REALIZED(e))
ewl_entry_ops_apply(e);
@@ -1250,8 +1256,12 @@
len = ewl_entry_length_get(e);
sp = ep = ewl_entry_cursor_position_get(EWL_ENTRY_CURSOR(e->cursor));
- op = ewl_entry_op_text_delete_new(e, sp, ep);
+ if (sp == len) return;
+ ep ++;
+
+ op = ewl_entry_op_text_delete_new(e, sp, ep - sp);
ecore_dlist_append(e->ops, op);
+
if (REALIZED(e))
ewl_entry_ops_apply(e);
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs