diff options
author | Daniel Carl <danielcarl@gmx.de> | 2013-03-24 15:38:00 +0100 |
---|---|---|
committer | Daniel Carl <danielcarl@gmx.de> | 2013-03-24 15:38:00 +0100 |
commit | 6e03f99eb55c6357a0cf5e991281c5512091adac (patch) | |
tree | 571fbe2e553d6e9f582a3ac9f9ae32a48cc7505d /src/completion.c | |
parent | ddf638a1b2df5fa70ae07c1c3b9739acf7bc71bd (diff) |
Merged url_history and history together.
The history mechanism can now handle different types of history and persist
the items into different files.
Diffstat (limited to 'src/completion.c')
-rw-r--r-- | src/completion.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/completion.c b/src/completion.c index 6d5797e..7835f45 100644 --- a/src/completion.c +++ b/src/completion.c @@ -19,7 +19,7 @@ #include "completion.h" #include "util.h" -#include "url_history.h" +#include "history.h" extern VbCore vb; @@ -77,24 +77,26 @@ gboolean completion_complete(gboolean back) vb.comps.completions = completion_init_completion( vb.comps.completions, source, (Comp_Func)g_str_has_prefix, &input[5], ":set " ); + g_list_free(source); } else if (!strncmp(input, ":open ", 6)) { - url_history_get_all(&source); + source = history_get_all(HISTORY_URL); vb.comps.completions = completion_init_completion( vb.comps.completions, source, (Comp_Func)util_strcasestr, &input[6], ":open " ); - g_list_free(source); + history_list_free(&source); } else if (!strncmp(input, ":tabopen ", 9)) { - url_history_get_all(&source); + source = history_get_all(HISTORY_URL); vb.comps.completions = completion_init_completion( vb.comps.completions, source, (Comp_Func)util_strcasestr, &input[9], ":tabopen " ); - g_list_free(source); + history_list_free(&source); } else { source = g_hash_table_get_keys(vb.behave.commands); source = g_list_sort(source, (GCompareFunc)g_strcmp0); vb.comps.completions = completion_init_completion( vb.comps.completions, source, (Comp_Func)g_str_has_prefix, &input[1], ":" ); + g_list_free(source); } if (!vb.comps.completions) { |