{
EditorFlags error;
EditorDescription *editor;
- if (!key) return FALSE;
+ if (!key) return EDITOR_ERROR_EMPTY;
editor = g_hash_table_lookup(editors, key);
- if (!editor) return FALSE;
- if (!list && !(editor->flags & EDITOR_NO_PARAM)) return FALSE;
+ if (!editor) return EDITOR_ERROR_EMPTY;
+ if (!list && !(editor->flags & EDITOR_NO_PARAM)) return EDITOR_ERROR_NO_FILE;
+
+ error = editor_command_parse(editor, list, TRUE, NULL);
- error = editor_command_start(editor, editor->name, list, working_directory, cb, data);
+ if (EDITOR_ERRORS(error)) return error;
+
+ error |= editor_command_start(editor, editor->name, list, working_directory, cb, data);
if (EDITOR_ERRORS(error))
{
g_free(text);
}
- return error;
+ return EDITOR_ERRORS(error);
}
EditorFlags start_editor_from_filelist(const gchar *key, GList *list)
}
}
- if (flags)
+ if (EDITOR_ERRORS(flags))
{
gchar *text = g_strdup_printf(_("%s\nUnable to start external command.\n"), editor_get_error_str(flags));
file_util_warning_dialog(ud->messages.fail, text, GTK_STOCK_DIALOG_ERROR, NULL);