gtkaspell_free_suggestions_list(gtkaspell);
suggestions = enchant_dict_suggest(gtkaspell->gtkaspeller->speller, word, strlen(word), &num_sug);
+ list = g_list_append(list, g_strdup(word));
if (suggestions == NULL || num_sug == 0) {
- gtkaspell->max_sug = - 1;
- gtkaspell->suggestions_list = NULL;
- return NULL;
+ gtkaspell->max_sug = -1;
+ gtkaspell->suggestions_list = list;
+ return list;
}
- list = g_list_append(list, g_strdup(word));
for (i = 0; i < num_sug; i++)
list = g_list_append(list, g_strdup((gchar *)suggestions[i]));