vp.comps.completions = completion_init_completion(
vp.comps.completions, source, (Comp_Func)util_strcasestr, &input[6], ":open "
);
+ g_list_free(source);
} else if (!strncmp(input, ":tabopen ", 9)) {
source = url_history_get_all();
vp.comps.completions = completion_init_completion(
vp.comps.completions, source, (Comp_Func)util_strcasestr, &input[9], ":tabopen "
);
+ g_list_free(source);
} else {
source = g_hash_table_get_keys(core.behave.commands);
source = g_list_sort(source, (GCompareFunc)g_strcmp0);
file_lock_set(fileno(file), F_UNLCK);
fclose(file);
+
+ /* reverse history form file */
+ core.behave.url_history = g_list_reverse(core.behave.url_history);
}
void url_history_cleanup(void)
if (item->title) {
g_free(item->title);
}
+ g_free(item);
}