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:
same \n fix for Delete key.
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/esmart/src/lib/esmart_textarea/esmart_textarea_cursor.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- esmart_textarea_cursor.c    7 Apr 2005 08:23:47 -0000       1.5
+++ esmart_textarea_cursor.c    7 Apr 2005 11:12:22 -0000       1.6
@@ -152,6 +152,23 @@
    pos = evas_object_textblock_cursor_pos_get(t->text);
    len = evas_object_textblock_length_get(t->text);
    if(pos == len) return;
+   len = evas_object_textblock_line_end_pos_get(t->text);
+   if(pos == len)
+     {
+       int formats = evas_object_textblock_format_next_count_get(t->text);
+       while(formats >= 0)
+         {
+            char format[100];
+            sprintf(format,"%s",evas_object_textblock_format_next_get(t->text, 
formats));
+            if(!strcmp(format,"\n"))
+              {
+                 evas_object_textblock_cursor_pos_set(t->text, pos+1);
+                 evas_object_textblock_format_prev_del(t->text, formats);
+                 break;
+              }
+            formats--;      
+         }
+     }
    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
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to