ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=a64ea17e6869660071284100c9416aaffd1504e7

commit a64ea17e6869660071284100c9416aaffd1504e7
Author: Kelly Wilson <[email protected]>
Date:   Sat Jan 31 12:24:25 2015 -0700

    Fix horizontal scroll highlighting
    
    This small change just bypasses highlighting if there is a y scroll. 
Vertical scrolling still updates the highlighting.
---
 AUTHORS                     | 2 +-
 src/bin/editor/edi_editor.c | 9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 24b3576..3a81e9a 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,5 +1,5 @@
 ajwillia.ms (Andy Williams) <[email protected]>
-wilsonk            (Kelly Wilson)  <[email protected]>
+wilsonk     (Kelly Wilson)  <[email protected]>
 
 With sections from Ecrire by Tom Hacohen <[email protected]>
 Clang syntax higlighting from cedric and TAsn in the edi PROTO project
diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c
index 51cf60a..f397486 100644
--- a/src/bin/editor/edi_editor.c
+++ b/src/bin/editor/edi_editor.c
@@ -239,13 +239,18 @@ _scroll_cb(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSE
 {
    Edi_Editor *editor = data;
    Evas_Coord y, h;
+   static Evas_Coord _edi_global_y;
 
-// TODO ignore y scrolls - just return;
    elm_scroller_region_get(editor->entry, NULL, &y, NULL, NULL);
    elm_scroller_region_get(editor->lines, NULL, NULL, NULL, &h);
    elm_scroller_region_show(editor->lines, 0, y, 10, h);
 
-   _update_highlight(editor);
+   // Don't update highlighting on y scroll, only h
+   if (_edi_global_y != y)
+     {
+        _update_highlight(editor);
+       _edi_global_y = y;
+     }
 }
 
 static void

-- 


Reply via email to