summaryrefslogtreecommitdiff
path: root/src/dwb.c
diff options
context:
space:
mode:
authorportix <none@none>2013-02-19 22:59:56 +0100
committerportix <none@none>2013-02-19 22:59:56 +0100
commitdfb9b624d3520e514f328fff7ecd1d4031c8286d (patch)
treeb3028aee0dc70b3657a8cc002f8cc0c55f76418e /src/dwb.c
parentf614ebb8fe343a2ef3ee14c68ee3317fa3f968b6 (diff)
downloaddwb-dfb9b624d3520e514f328fff7ecd1d4031c8286d.zip
Filter command/search/navigation history
Diffstat (limited to 'src/dwb.c')
-rw-r--r--src/dwb.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/dwb.c b/src/dwb.c
index 519a450a..0f70a858 100644
--- a/src/dwb.c
+++ b/src/dwb.c
@@ -663,7 +663,7 @@ dwb_set_error_message(GList *gl, const char *error, ...)
webkit_dom_html_element_set_inner_text(WEBKIT_DOM_HTML_ELEMENT(VIEW(gl)->status_element), message, NULL);
}
dwb.state.message_id = g_timeout_add_seconds(dwb.misc.message_delay, (GSourceFunc)dwb_hide_message, NULL);
- gtk_widget_hide(dwb.gui.entry);
+ entry_hide();
}/*}}}*/
static gboolean
@@ -1646,7 +1646,7 @@ dwb_focus_scroll(GList *gl)
gtk_widget_set_can_focus(v->web, true);
gtk_widget_grab_focus(v->web);
- gtk_widget_hide(dwb.gui.entry);
+ entry_hide();
}/*}}}*/
/* dwb_handle_mail(const char *uri) return: true if it is a mail-address{{{*/
@@ -2348,9 +2348,6 @@ dwb_update_layout()
void
dwb_focus(GList *gl)
{
- if (dwb.gui.entry)
- gtk_widget_hide(dwb.gui.entry);
-
dwb.state.fview = gl;
view_set_active_style(gl);
dwb_focus_scroll(gl);
@@ -2826,6 +2823,9 @@ dwb_eval_override_key(GdkEventKey *e, CommandProperty prop)
gboolean isprint;
gboolean ret = false;
+ if (gtk_widget_has_focus(dwb.gui.entry) && e->keyval == GDK_KEY_BackSpace)
+ entry_clear_history();
+
if (CLEAN_STATE(e) && (key = dwb_get_key(e, &mod, &isprint)) != NULL)
{
for (GList *l = dwb.override_keys; l; l=l->next)
@@ -4424,6 +4424,10 @@ dwb_init_vars(void)
dwb.misc.bar_height = 0;
dwb.state.last_tab = 0;
+
+ dwb.state.last_com_history = NULL;
+ dwb.state.last_nav_history = NULL;
+ dwb.state.last_find_history = NULL;
}