From 45c87ed009d771d8289767e3c2ecfe0d32971f80 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Thu, 13 Mar 2008 00:27:16 +0000 Subject: [PATCH] Move the cursor to the end only if we highlight the completed match Signed-off-by: Federico Mena Quintero svn path=/trunk/; revision=19801 --- gtk/gtkfilechooserentry.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c index 3346133660..a6c6629640 100644 --- a/gtk/gtkfilechooserentry.c +++ b/gtk/gtkfilechooserentry.c @@ -536,6 +536,8 @@ append_common_prefix (GtkFileChooserEntry *chooser_entry, chooser_entry->file_part_pos + common_prefix_len); chooser_entry->has_completion = TRUE; } + else + gtk_editable_set_position (GTK_EDITABLE (chooser_entry), GTK_ENTRY (chooser_entry)->text_length); } g_free (common_prefix); @@ -786,8 +788,6 @@ gtk_file_chooser_entry_focus (GtkWidget *widget, if (!chooser_entry->has_completion) append_common_prefix (chooser_entry, FALSE); - gtk_editable_set_position (editable, entry->text_length); - /* Trigger the completion window to pop up again by a * zero-length insertion, a bit of a hack. */