Commit c41f5832 authored by Andy Williams's avatar Andy Williams

elm_code: Fix tooltip crash

parent fa73c7b2
......@@ -388,7 +388,6 @@ _elm_code_widget_fill_line(Elm_Code_Widget *widget, Elm_Code_Line *line)
if (line->number < elm_code_file_lines_get(line->file))
_elm_code_widget_fill_whitespace(widget, '\n', &cells[length + gutter]);
elm_object_tooltip_text_set(grid, line->status_text);
evas_object_textgrid_update_add(grid, 0, 0, w, 1);
}
......@@ -1113,7 +1112,17 @@ _elm_code_widget_mouse_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
_elm_code_widget_position_at_coordinates_get(widget, pd, event->cur.canvas.x, event->cur.canvas.y, &row, &col);
if (!pd->editable || !event->buttons)
return;
{
Elm_Code_Line *line;
line = elm_code_file_line_get(elm_code_widget_code_get(widget)->file, row);
if (line)
elm_object_tooltip_text_set(widget, line->status_text);
else
elm_object_tooltip_text_set(widget, NULL);
return;
}
if (!pd->selection)
if (col > 0 && row <= elm_code_file_lines_get(pd->code->file))
......
......@@ -59,10 +59,6 @@ void _elm_code_widget_backspace(Elm_Code_Widget *widget);
void _elm_code_widget_delete(Elm_Code_Widget *widget);
void _elm_code_widget_tooltip_text_set(Evas_Object *widget, const char *text);
void _elm_code_widget_tooltip_add(Evas_Object *widget);
EAPI Elm_Code_Widget_Selection_Data *elm_code_widget_selection_normalized_get(Evas_Object *widget);
void _elm_code_widget_selection_delete_no_undo(Elm_Code_Widget *widget);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment