editor: don't auto save always.

If save has been accomplished, we can skip a auto save.

This auto save brings enventor unexpected error highlighting twice.
This commit is contained in:
Hermet Park 2016-03-05 11:17:15 +09:00
parent 5900c6ac37
commit 3a2c08e6c5
1 changed files with 7 additions and 2 deletions

View File

@ -1122,8 +1122,13 @@ static Eina_Bool
auto_save_timer_cb(void *data)
{
edit_data *ed = data;
edit_save(ed, build_edc_path_get());
build_edc();
//Avoid auto save if save has been already accomplished.
if (ed->edit_changed)
{
edit_save(ed, build_edc_path_get());
build_edc();
}
ed->auto_save_timer = NULL;
return ECORE_CALLBACK_CANCEL;
}