mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-25 13:37:02 +03:00
Fix url completion
svn path=/trunk/netsurf/; revision=2743
This commit is contained in:
parent
e7747de2e1
commit
1fcceb72f6
@ -1375,15 +1375,19 @@ bool urldb_iterate_entries_path(const struct path_data *parent,
|
|||||||
* attached to them. If this is not the case, it indicates
|
* attached to them. If this is not the case, it indicates
|
||||||
* that there's a bug in the file loader/URL insertion code.
|
* that there's a bug in the file loader/URL insertion code.
|
||||||
* Therefore, assert this here. */
|
* Therefore, assert this here. */
|
||||||
assert(parent->url || parent->cookies);
|
assert(url_callback || cookie_callback);
|
||||||
|
|
||||||
/** \todo handle fragments? */
|
/** \todo handle fragments? */
|
||||||
if (url_callback && parent->url && !url_callback(parent->url,
|
if (url_callback) {
|
||||||
(const struct url_data *) &parent->urld))
|
assert(parent->url);
|
||||||
return false;
|
if (!url_callback(parent->url,
|
||||||
if (cookie_callback && parent->cookies && !cookie_callback(
|
(const struct url_data *) &parent->urld))
|
||||||
(const struct cookie_data *) parent->cookies))
|
return false;
|
||||||
return false;
|
} else {
|
||||||
|
if (parent->cookies && !cookie_callback(
|
||||||
|
(const struct cookie_data *) parent->cookies))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (p = parent->children; p; p = p->next) {
|
for (p = parent->children; p; p = p->next) {
|
||||||
|
@ -177,7 +177,10 @@ bool ro_gui_url_complete_keypress(struct gui_window *g, int key)
|
|||||||
|
|
||||||
/* find matches */
|
/* find matches */
|
||||||
url_complete_memory_exhausted = false;
|
url_complete_memory_exhausted = false;
|
||||||
urldb_iterate_partial(match_url, url_complete_callback);
|
if (strlen(match_url) == 0)
|
||||||
|
urldb_iterate_entries(url_complete_callback);
|
||||||
|
else
|
||||||
|
urldb_iterate_partial(match_url, url_complete_callback);
|
||||||
if (url_complete_memory_exhausted) {
|
if (url_complete_memory_exhausted) {
|
||||||
ro_gui_url_complete_close(NULL, 0);
|
ro_gui_url_complete_close(NULL, 0);
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user