From c0db6a038c3fa130a57fec7b858e5b8553d3b491 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Sat, 23 Mar 2013 11:48:58 +0100 Subject: [PATCH] Fixed url hostory init bug. If the browser read the history from file in the init function the history max items where not set so we considered the max items to be 0. Now the url history is initialized if the config is processed. --- src/main.c | 2 +- src/setting.c | 1 - src/url_history.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index 8461ec7..494f7f4 100644 --- a/src/main.c +++ b/src/main.c @@ -732,8 +732,8 @@ static void vb_init_core(void) setting_init(); command_init(); keybind_init(); - url_history_init(); vb_read_config(); + url_history_init(); vb_update_status_style(); vb_update_input_style(VB_MSG_NORMAL); diff --git a/src/setting.c b/src/setting.c index 1ad41a5..790b49d 100644 --- a/src/setting.c +++ b/src/setting.c @@ -681,7 +681,6 @@ static gboolean setting_history_max_items(const Setting* s, const SettingType ty return TRUE; } - vb.config.url_history_max = s->arg.i; return TRUE; diff --git a/src/url_history.c b/src/url_history.c index 5ebcbfe..d8ee6b8 100644 --- a/src/url_history.c +++ b/src/url_history.c @@ -81,7 +81,7 @@ void url_history_cleanup(void) void url_history_add(const char* url, const char* title) { - /* uf the url is already in history, remove this entry */ + /* if the url is already in history, remove this entry */ /* TODO use g_list_find_custom for this task */ for (GList* link = vb.behave.url_history; link; link = link->next) { UrlHist* hi = (UrlHist*)link->data; -- 2.20.1