Avoid string split in midori_location_action_popup_timeout_cb
This commit is contained in:
parent
f3a4bd4b6a
commit
79b29a9362
1 changed files with 5 additions and 11 deletions
|
@ -418,20 +418,14 @@ midori_location_action_popup_timeout_cb (gpointer data)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* No completion when typing a search token */
|
/* No completion when typing a search token */
|
||||||
if (action->search_engines != NULL)
|
if (action->search_engines
|
||||||
|
&& katze_array_find_token (action->search_engines, action->key))
|
||||||
{
|
{
|
||||||
gchar** parts = g_strsplit (action->key, " ", 2);
|
|
||||||
if (parts && *parts && parts[1]
|
|
||||||
&& katze_array_find_token (action->search_engines, *parts))
|
|
||||||
{
|
|
||||||
g_strfreev (parts);
|
|
||||||
midori_location_action_popdown_completion (action);
|
midori_location_action_popdown_completion (action);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
g_strfreev (parts);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Empaty string or starting with a space means: no completion */
|
/* Empty string or starting with a space means: no completion */
|
||||||
if (!(action->key && *action->key && *action->key != ' '))
|
if (!(action->key && *action->key && *action->key != ' '))
|
||||||
{
|
{
|
||||||
midori_location_action_popdown_completion (action);
|
midori_location_action_popdown_completion (action);
|
||||||
|
|
Loading…
Reference in a new issue