return TRUE;
} else if (def_key("location", GDK_KEY_t) == key) {
gtk_widget_grab_focus(c->location);
- gtk_entry_set_text(GTK_ENTRY(c->location),
- webkit_web_view_get_uri(WEBKIT_WEB_VIEW(c->web_view)));
+ const char *uri = webkit_web_view_get_uri(WEBKIT_WEB_VIEW(c->web_view));
+ const char *goal = (uri) ? uri : "https://";
+ gtk_entry_set_text(GTK_ENTRY(c->location), goal);
+ gtk_editable_set_position(GTK_EDITABLE(c->location), -1);
return TRUE;
} else if (def_key("previous_tab", GDK_KEY_u) == key) {
gtk_notebook_prev_page(GTK_NOTEBOOK(mw.notebook));