diff options
author | Andy Hertzfeld <andy@src.gnome.org> | 2001-02-20 23:30:41 +0000 |
---|---|---|
committer | Andy Hertzfeld <andy@src.gnome.org> | 2001-02-20 23:30:41 +0000 |
commit | 4e6e520fd4e9837ebe7ff72638dc13a0274fb855 (patch) | |
tree | bf03ac1fdb253d0777764434b4cb402d6d4d1844 /src | |
parent | 9ccb5f0fe2e2bed70b363b034c1a2f72604f19ce (diff) | |
download | nautilus-4e6e520fd4e9837ebe7ff72638dc13a0274fb855.tar.gz |
fixed bug 6717, problem editing a uri with a '#' in the middle, by adding
* src/nautilus-location-bar.c: (try_to_expand_path):
fixed bug 6717, problem editing a uri with a '#' in the middle,
by adding a check to the auto-complete code to not substitute
zero length strings.
Diffstat (limited to 'src')
-rw-r--r-- | src/nautilus-location-bar.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nautilus-location-bar.c b/src/nautilus-location-bar.c index 09dad1e6c..1212d45ec 100644 --- a/src/nautilus-location-bar.c +++ b/src/nautilus-location-bar.c @@ -296,7 +296,7 @@ try_to_expand_path (NautilusLocationBar *bar) GnomeVFSURI *uri; GtkEditable *editable; - int base_length; + uint base_length; int current_path_length; int offset; const char *base_name_ptr; @@ -374,8 +374,9 @@ try_to_expand_path (NautilusLocationBar *bar) } /* if we've got something, add it to the entry */ - if (expand_text && !nautilus_str_has_suffix (current_path, expand_text)) { - gtk_entry_append_text (GTK_ENTRY (editable), expand_text + base_length); + if (expand_text && !nautilus_str_has_suffix (current_path, expand_text) + && base_length < strlen (expand_text)) { + gtk_entry_append_text (GTK_ENTRY (editable), expand_text + base_length); gtk_entry_select_region (GTK_ENTRY (editable), current_path_length - offset, current_path_length + strlen (expand_text) - base_length - offset); g_free (expand_text); |