forked from enlightenment/edi
mainview: check end bounds also.
This commit is contained in:
parent
29ed0013a1
commit
fdf22ab85c
|
@ -801,6 +801,7 @@ void
|
|||
edi_mainview_panel_goto_position(Edi_Mainview_Panel *panel, unsigned int row, unsigned int col)
|
||||
{
|
||||
Edi_Editor *editor;
|
||||
Elm_Code *code;
|
||||
|
||||
if (!panel || !panel->current)
|
||||
return;
|
||||
|
@ -809,6 +810,10 @@ edi_mainview_panel_goto_position(Edi_Mainview_Panel *panel, unsigned int row, un
|
|||
if (!editor || row <= 0 || col <= 0)
|
||||
return;
|
||||
|
||||
code = elm_code_widget_code_get(editor->entry);
|
||||
if (row > elm_code_file_lines_get(code->file))
|
||||
return;
|
||||
|
||||
elm_code_widget_cursor_position_set(editor->entry, row, col);
|
||||
elm_object_focus_set(editor->entry, EINA_TRUE);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue