diff options
author | Andy Williams <andy@andywilliams.me> | 2017-02-27 20:51:40 +0000 |
---|---|---|
committer | Andy Williams <andy@andywilliams.me> | 2017-02-27 20:51:40 +0000 |
commit | dc08c574116cd1869c1e03124a5665686bc06f7a (patch) | |
tree | d77f1a4d82740f4ecd06da134844632fa429c8fc | |
parent | cd1f98624478297241389b6a96d9349ca7c7ab3a (diff) | |
download | efl-dc08c574116cd1869c1e03124a5665686bc06f7a.tar.gz |
elm_code: Hide the cursor when it is off screen
This resolves cursor artifacts that could be seen @fix
-rw-r--r-- | src/lib/elementary/elm_code_widget.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_code_widget.c b/src/lib/elementary/elm_code_widget.c index 06715c75ce..62ff893465 100644 --- a/src/lib/elementary/elm_code_widget.c +++ b/src/lib/elementary/elm_code_widget.c @@ -285,10 +285,10 @@ _elm_code_widget_fill_cursor(Elm_Code_Widget *widget, unsigned int number, int g elm_layout_signal_emit(pd->cursor_rect, "elm,action,focus", "elm"); evas_object_resize(pd->cursor_rect, cw/8, ch); - evas_object_show(pd->cursor_rect); } evas_object_move(pd->cursor_rect, cx, cy); + evas_object_show(pd->cursor_rect); } } @@ -400,6 +400,9 @@ _elm_code_widget_fill_range(Elm_Code_Widget *widget, unsigned int first_row, uns if (newline && !elm_obj_code_widget_line_visible_get(widget, newline)) return; + // cursor will be shown if it should be visible + evas_object_hide(pd->cursor_rect); + for (y = first_row; y <= last_row; y++) { line = elm_code_file_line_get(pd->code->file, y); |