elm_code: small optimisation for large files

This commit is contained in:
Andy Williams 2017-08-02 10:32:13 +01:00
parent cae354d299
commit 91293d3b25
1 changed files with 5 additions and 1 deletions

View File

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