Fix horizontal scroll highlighting

This small change just bypasses highlighting if there is a y scroll. Vertical scrolling still updates the highlighting.
This commit is contained in:
Kelly Wilson 2015-01-31 12:24:25 -07:00
parent 68679607e6
commit a64ea17e68
2 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,5 @@
ajwillia.ms (Andy Williams) <andy@andywilliams.me>
wilsonk (Kelly Wilson) <wilsonk@cpsc.ucalgary.ca>
wilsonk (Kelly Wilson) <wilsonk@cpsc.ucalgary.ca>
With sections from Ecrire by Tom Hacohen <tom@stosb.com>
Clang syntax higlighting from cedric and TAsn in the edi PROTO project

View File

@ -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