Enlightenment CVS committal
Author : codewarrior
Project : e17
Module : libs/esmart
Dir : e17/libs/esmart/src/lib/esmart_textarea
Modified Files:
esmart_textarea_cursor.c
Log Message:
initial line merging support (removal of \n). still need to take care of white
lines.
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/esmart/src/lib/esmart_textarea/esmart_textarea_cursor.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- esmart_textarea_cursor.c 5 Apr 2005 23:06:03 -0000 1.4
+++ esmart_textarea_cursor.c 7 Apr 2005 08:23:47 -0000 1.5
@@ -156,6 +156,7 @@
}
/* delete left, backspace, one character from current location */
+/* TODO: Fix BS on white lines */
void _esmart_textarea_cursor_delete_left(Esmart_Text_Area *t) {
int pos, start;
pos = evas_object_textblock_cursor_pos_get(t->text);
@@ -163,9 +164,19 @@
if(pos == 0) return;
if(pos == start)
{
- /* we need to remove the formatting!! we cant though because
- * of current limitations in textblock, bug raster to fix
- */
+ int formats = evas_object_textblock_format_prev_count_get(t->text);
+ while(formats >= 0)
+ {
+ char format[100];
+ sprintf(format,"%s",evas_object_textblock_format_prev_get(t->text,
formats));
+ if(!strcmp(format,"\n"))
+ {
+ evas_object_textblock_cursor_pos_set(t->text, pos-1);
+ evas_object_textblock_format_next_del(t->text, formats);
+ break;
+ }
+ formats--;
+ }
}
evas_object_textblock_cursor_pos_set(t->text, pos - 1);
evas_object_textblock_text_del(t->text, 1);
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs