Swap checks for completion data and key to fix the arrow popup
This commit is contained in:
parent
b4a6de2e96
commit
72ae687ef2
1 changed files with 49 additions and 51 deletions
|
@ -638,12 +638,10 @@ midori_location_entry_render_text_cb (GtkCellLayout* layout,
|
|||
: g_ascii_strdown (gtk_entry_get_text (GTK_ENTRY (entry)), -1);
|
||||
len = 0;
|
||||
}
|
||||
if (key && *key)
|
||||
{
|
||||
if (G_LIKELY (data && uri))
|
||||
{
|
||||
temp = g_ascii_strdown (uri, -1);
|
||||
if ((start = strstr (temp, key)))
|
||||
if (key && *key && (start = strstr (temp, key)))
|
||||
{
|
||||
len = strlen (key);
|
||||
skey = g_malloc0 (len + 1);
|
||||
|
@ -666,7 +664,7 @@ midori_location_entry_render_text_cb (GtkCellLayout* layout,
|
|||
if (G_LIKELY (data && title))
|
||||
{
|
||||
temp = g_utf8_strdown (title, -1);
|
||||
if ((start = strstr (temp, key)))
|
||||
if (key && *key && (start = strstr (temp, key)))
|
||||
{
|
||||
if (!len)
|
||||
len = strlen (key);
|
||||
|
@ -696,7 +694,7 @@ midori_location_entry_render_text_cb (GtkCellLayout* layout,
|
|||
|
||||
g_object_set (renderer, "markup", desc,
|
||||
"ellipsize-set", TRUE, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
|
||||
}
|
||||
|
||||
g_free (uri);
|
||||
g_free (title);
|
||||
g_free (key);
|
||||
|
|
Loading…
Reference in a new issue