From 86009fba3857ecac8e378f40ce42f4dc30ef7171 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 17 Mar 2005 18:09:24 +0000 Subject: [PATCH] Make inline completion insert the prefix at the right spot. (#170146, Doug 2005-03-17 Matthias Clasen * gtk/gtkentrycompletion.c (gtk_entry_completion_real_insert_prefix): Make inline completion insert the prefix at the right spot. (#170146, Doug Quale) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gtk/gtkentrycompletion.c | 3 ++- 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e792fcdb3d..a24a0a3e46 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-03-17 Matthias Clasen + + * gtk/gtkentrycompletion.c (gtk_entry_completion_real_insert_prefix): + Make inline completion insert the prefix at the + right spot. (#170146, Doug Quale) + 2005-03-17 Tor Lillqvist * gdk/gdkkeynames.c: gdk_key is a typedef, not a struct tag. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index e792fcdb3d..a24a0a3e46 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2005-03-17 Matthias Clasen + + * gtk/gtkentrycompletion.c (gtk_entry_completion_real_insert_prefix): + Make inline completion insert the prefix at the + right spot. (#170146, Doug Quale) + 2005-03-17 Tor Lillqvist * gdk/gdkkeynames.c: gdk_key is a typedef, not a struct tag. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index e792fcdb3d..a24a0a3e46 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2005-03-17 Matthias Clasen + + * gtk/gtkentrycompletion.c (gtk_entry_completion_real_insert_prefix): + Make inline completion insert the prefix at the + right spot. (#170146, Doug Quale) + 2005-03-17 Tor Lillqvist * gdk/gdkkeynames.c: gdk_key is a typedef, not a struct tag. diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c index 9672e48317..4af7527a56 100644 --- a/gtk/gtkentrycompletion.c +++ b/gtk/gtkentrycompletion.c @@ -1468,7 +1468,6 @@ gtk_entry_completion_real_insert_prefix (GtkEntryCompletion *completion, { gint key_len; gint prefix_len; - gint pos; const gchar *key; prefix_len = g_utf8_strlen (prefix, -1); @@ -1478,6 +1477,8 @@ gtk_entry_completion_real_insert_prefix (GtkEntryCompletion *completion, if (prefix_len > key_len) { + gint pos = prefix_len; + gtk_editable_insert_text (GTK_EDITABLE (completion->priv->entry), prefix + key_len, -1, &pos); gtk_editable_select_region (GTK_EDITABLE (completion->priv->entry),