console: return function as soon as possible.

This commit is contained in:
Hermet Park 2016-08-19 12:57:39 +09:00
parent f0ab0ec9a9
commit ec0d43a307
1 changed files with 7 additions and 4 deletions

View File

@ -18,6 +18,13 @@ token_value_get(char *src, char *key_str, char end_key, int offset, char *dst)
static void
error_word_select(Evas_Object *console)
{
Enventor_Item *it = file_mgr_focused_item_get();
if (!it)
{
EINA_LOG_ERR("No focused item??");
return;
}
//Convert console text including markup text to the plain text
const char *markup_text = elm_entry_entry_get(console);
if (!markup_text) return;
@ -42,10 +49,6 @@ error_word_select(Evas_Object *console)
else
goto end;
//FIXME: Need to get the file that contains errors.
Enventor_Item *it = file_mgr_focused_item_get();
EINA_SAFETY_ON_NULL_RETURN(it);
//Find error word position
enventor_item_line_goto(it, atoi(error_line));
int pos = enventor_item_cursor_pos_get(it);