Using non-utf8 strlen for titles in completion should suffice
This commit is contained in:
parent
c27642e912
commit
a324cad92a
2 changed files with 2 additions and 3 deletions
|
@ -541,11 +541,10 @@ midori_location_entry_render_text_cb (GtkCellLayout* layout,
|
|||
temp = g_utf8_strdown (title, -1);
|
||||
if ((start = strstr (temp, key)))
|
||||
{
|
||||
size_t utf8_len = g_utf8_strlen (key, -1);
|
||||
if (!len)
|
||||
len = strlen (key);
|
||||
skey = g_malloc0 (len + 1);
|
||||
g_utf8_strncpy (skey, title + (start - temp), utf8_len);
|
||||
strncpy (skey, title + (start - temp), len);
|
||||
parts = g_strsplit (title, skey, 2);
|
||||
if (parts && parts[0] && parts[1])
|
||||
desc_title = g_markup_printf_escaped ("%s<b>%s</b>%s",
|
||||
|
|
|
@ -31,7 +31,7 @@ static const CompletionItem items[] = {
|
|||
{ "http://one.com/one/", "One off" },
|
||||
{ "http://four.org", "One" },
|
||||
{ "https://four.org", "Four" },
|
||||
{ "ftp://four.org/", "Five" },
|
||||
{ "ftp://four.org/", "ごオルゴ" },
|
||||
{ "http://muenchen.de/weißwürste/", "Münchner Weißwürste" }, /* Umlauts */
|
||||
};
|
||||
static const guint items_n = 9;
|
||||
|
|
Loading…
Reference in a new issue