aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--src/bookmarks/ephy-keywords-entry.c13
2 files changed, 13 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 8f0f51193..4e63a22bc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2003-03-09 Xan Lopez <xan@masilla.org>
+ * src/bookmarks/ephy-keywords-entry.c: (try_to_expand_keyword):
+
+ Properly autocomplete when topics have national characters, fix
+ #107685
+
+2003-03-09 Xan Lopez <xan@masilla.org>
+
* src/bookmarks/ephy-bookmarks-editor.c: (build_editing_table),
(ephy_bookmarks_editor_construct):
* src/bookmarks/ephy-new-bookmark.c: (build_editing_table):
diff --git a/src/bookmarks/ephy-keywords-entry.c b/src/bookmarks/ephy-keywords-entry.c
index 0894bfcae..eccb83aae 100644
--- a/src/bookmarks/ephy-keywords-entry.c
+++ b/src/bookmarks/ephy-keywords-entry.c
@@ -82,13 +82,12 @@ static void
try_to_expand_keyword (GtkEditable *editable)
{
char *entry_text;
- char *user_text;
+ const char *user_text;
const char *expand_text;
- char *insert_text;
+ const char *insert_text;
int user_text_length;
- int expand_text_length;
int keyword_offset = 0;
- int tmp;
+ int position;
EphyKeywordsEntry *entry = EPHY_KEYWORDS_ENTRY (editable);
EphyNode *node;
@@ -121,14 +120,14 @@ try_to_expand_keyword (GtkEditable *editable)
LOG ("Expand text %s", expand_text)
- expand_text_length = g_utf8_strlen (expand_text, -1);
user_text_length = g_utf8_strlen (user_text, -1);
insert_text = g_utf8_offset_to_pointer (expand_text, user_text_length);
+
gtk_editable_insert_text (editable,
insert_text,
- g_utf8_strlen (insert_text, -1),
- &tmp);
+ strlen (insert_text),
+ &position);
gtk_editable_select_region (editable, user_text_length + keyword_offset, -1);
}
else