aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2017-08-02 10:32:13 +0100
committerAndy Williams <andy@andywilliams.me>2017-08-02 10:32:13 +0100
commit91293d3b25e114caa6db28603bdd453537966018 (patch)
treeb9ea8af0b5838f61f71b42a54c66992718e11ba4
parenteina hamster count - use a fixed version, revision etc. so builds repro (diff)
downloadefl-91293d3b25e114caa6db28603bdd453537966018.tar.gz
elm_code: small optimisation for large files
-rw-r--r--src/lib/elementary/elm_code_widget.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_code_widget.c b/src/lib/elementary/elm_code_widget.c
index ceea5d2c47..2529321cac 100644
--- a/src/lib/elementary/elm_code_widget.c
+++ b/src/lib/elementary/elm_code_widget.c
@@ -466,10 +466,14 @@ static void
_elm_code_widget_fill(Elm_Code_Widget *widget)
{
Elm_Code_Widget_Data *pd;
+ unsigned int height;
pd = efl_data_scope_get(widget, ELM_CODE_WIDGET_CLASS);
+ height = elm_code_widget_lines_visible_get(widget);
+ if (height > elm_code_file_lines_get(pd->code->file))
+ height = elm_code_file_lines_get(pd->code->file);
- _elm_code_widget_fill_update(widget, 1, elm_code_file_lines_get(pd->code->file), NULL);
+ _elm_code_widget_fill_update(widget, 1, height, NULL);
}
static void