netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/ecrire.git/commit/?id=55328b39f7c841e68aa2f726fc6af6884d5864c9

commit 55328b39f7c841e68aa2f726fc6af6884d5864c9
Author: Alastair Poole <nets...@gmail.com>
Date:   Thu Apr 8 11:24:13 2021 +0100

    goto: do a scrolly thing with the goto.
---
 src/bin/ui/goto_dialog.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/bin/ui/goto_dialog.c b/src/bin/ui/goto_dialog.c
index c92b875..0a4ae32 100644
--- a/src/bin/ui/goto_dialog.c
+++ b/src/bin/ui/goto_dialog.c
@@ -17,10 +17,14 @@ _goto_do(Evas_Object *entry, const char *text)
    evas_object_hide(goto_popup);
    if (line > 0)
      {
+        Evas_Coord x, y;
         evas_textblock_cursor_line_set(mcur, line-1);
         elm_entry_calc_force(entry);
         evas_object_smart_callback_call(entry, "cursor,changed", NULL);
         elm_object_focus_set(entry, EINA_TRUE);
+        elm_entry_cursor_geometry_get(entry, &x, &y, NULL, NULL);
+        elm_scroller_region_bring_in(entry, 0, y, x, y);
+        elm_entry_cursor_line_begin_set(entry);
      }
 }
 

-- 


Reply via email to