Evas textblock: Removed useless code. We should never get there.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 14 Jul 2011 14:25:46 +0000 (14:25 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 14 Jul 2011 14:25:46 +0000 (14:25 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@61370 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_textblock.c

index 9ff941c..ac44db4 100644 (file)
@@ -7594,7 +7594,7 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E
    Evas_Object_Textblock *o;
    Evas_Object_Textblock_Paragraph *found_par;
    Evas_Object_Textblock_Line *ln;
-   Evas_Object_Textblock_Item *it = NULL, *it_break = NULL;
+   Evas_Object_Textblock_Item *it = NULL;
 
    if (!cur) return EINA_FALSE;
    o = (Evas_Object_Textblock *)(cur->obj->object_data);
@@ -7644,11 +7644,6 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E
 
                   EINA_INLIST_FOREACH(ln->items, it)
                     {
-                       if ((it->x + ln->x) > x)
-                         {
-                            it_break = it;
-                            break;
-                         }
                        if (((it->x + ln->x) <= x) && (((it->x + ln->x) + it->adv) > x))
                          {
                             if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
@@ -7682,23 +7677,6 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E
                               }
                          }
                     }
-                  if (it_break)
-                    {
-                       it = it_break;
-                       cur->node = it->text_node;
-                       cur->pos = it->text_pos;
-
-                       /*FIXME: NOTE: Not sure what it's good for.
-                        * needs smarter handling, ATM just check, if it's
-                        * the first item, then go to the end of the line, helps
-                        * with rtl langs, doesn't affect ltr langs that much. */
-                       if (!EINA_INLIST_GET(it)->prev)
-                         {
-                            evas_textblock_cursor_line_char_last(cur);
-                         }
-
-                       return EINA_TRUE;
-                    }
                }
           }
      }