jaehyun pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=324454b3cb0da9f9e4344202276b062b3dc45f4c

commit 324454b3cb0da9f9e4344202276b062b3dc45f4c
Author: YeongJong Lee <clean...@naver.com>
Date:   Thu Feb 2 10:44:01 2017 +0900

    goto: fix scroll issue
    
    Summary:
    Add scroller_region_show method.
    
    fix https://phab.enlightenment.org/T4416
    
    Test Plan:
    1. Run enventor
    2. Open goto window using shortcut key(<Ctrl> + <l>)
    3. type line number
    4. check the scroller scroll correctly
    
    Reviewers: Jaehyun_Cho, Hermet
    
    Reviewed By: Jaehyun_Cho
    
    Differential Revision: https://phab.enlightenment.org/D4619
---
 src/lib/edc_editor.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/lib/edc_editor.c b/src/lib/edc_editor.c
index 1d5ffa0..1a74373 100644
--- a/src/lib/edc_editor.c
+++ b/src/lib/edc_editor.c
@@ -1659,10 +1659,14 @@ edit_max_line_get(edit_data *ed)
 void
 edit_goto(edit_data *ed, int line)
 {
+   int cursor_y;
+
    elm_entry_select_none(ed->en_edit);
    Evas_Object *tb = elm_entry_textblock_get(ed->en_edit);
    Evas_Textblock_Cursor *cur = evas_object_textblock_cursor_get(tb);
    evas_textblock_cursor_line_set(cur, (line - 1));
+   elm_entry_cursor_geometry_get(ed->en_edit, NULL, &cursor_y, NULL, NULL);
+   elm_scroller_region_show(ed->scroller, 0, cursor_y, 0, 0);
    elm_entry_calc_force(ed->en_edit);
    elm_object_focus_set(ed->en_edit, EINA_TRUE);
 }

-- 


Reply via email to