edje: pass whole text to IMF in case of selection
authorJihoon Kim <jihoon48.kim@samsung.com>
Thu, 8 Jun 2017 08:02:35 +0000 (17:02 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Thu, 8 Jun 2017 08:02:35 +0000 (17:02 +0900)
Summary:
This patch partially reverts D2951.
_edje_entry_imf_retrieve_surrounding_cb() function has to pass
whole text nearby the entry's cursor. If IMF needs to ignore
selected text when the entry has selection, IMF can check
selected text by calling _edje_entry_imf_retrieve_selection_cb().
So, we don't need remove selected text before passing it to IMF.
@fix

Test Plan: N/A

Reviewers: woohyun, jihoon, subodh6129

Reviewed By: subodh6129

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4321

src/lib/edje/edje_entry.c

index 14c400c..74d93c8 100644 (file)
@@ -4528,23 +4528,8 @@ _edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx EINA_
                        for (itr = plain_text; itr && *itr; ++itr)
                          *itr = '*';
                     }
-                  if (en->have_selection)
-                    {
-                       if (en->sel_start)
-                         {
-                            *text = strndup(plain_text,
-                                  evas_textblock_cursor_pos_get(en->sel_start));
-                         }
-                       else
-                         {
-                            *text = strdup(plain_text);
-                         }
-                    }
-                  else
-                    {
-                       *text = strdup(plain_text);
-                    }
 
+                  *text = strdup(plain_text);
                   free(plain_text);
                   plain_text = NULL;
                }