elm_code whitespace: only display actual newlines

No newlines at the end of a file if there is no other line
This commit is contained in:
Andy Williams 2015-03-18 22:18:34 +00:00
parent e4cf9ed41a
commit 4398dd38f8
1 changed files with 2 additions and 2 deletions

View File

@ -334,7 +334,8 @@ _elm_code_widget_fill_line(Elm_Code_Widget *widget, Elm_Code_Line *line)
_elm_code_widget_fill_cursor(widget, line, cells, gutter, w);
_elm_code_widget_fill_selection(widget, line, cells, gutter, w);
_elm_code_widget_fill_whitespace(widget, '\n', &cells[length + gutter]);
if (line->number < elm_code_file_lines_get(line->file))
_elm_code_widget_fill_whitespace(widget, '\n', &cells[length + gutter]);
evas_object_textgrid_update_add(pd->grid, 0, line->number - 1, w, 1);
}
@ -402,7 +403,6 @@ _elm_code_widget_line_cb(void *data, Eo *obj EINA_UNUSED,
return EO_CALLBACK_CONTINUE;
}
static Eina_Bool
_elm_code_widget_file_cb(void *data, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED,
void *event_info EINA_UNUSED)