From f19fff94dd1f4a554fc2f960b498814b2e6b9915 Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Mon, 18 May 2026 22:01:49 -0400 Subject: location-bar: add trailing slash to displayed location path When pressing Ctrl+L to show the location bar, the displayed path now includes a trailing slash so users can immediately start typing a subfolder name without having to press the slash key first. Fixes #874 --- src/caja-location-bar.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/caja-location-bar.c b/src/caja-location-bar.c index 14d99a6f..6f7455ae 100644 --- a/src/caja-location-bar.c +++ b/src/caja-location-bar.c @@ -579,6 +579,17 @@ caja_location_bar_set_location (CajaLocationBar *bar, g_object_unref (file); caja_location_entry_update_current_location (CAJA_LOCATION_ENTRY (bar->details->entry), formatted_location); + + /* Add trailing slash in display only so users can immediately type a subfolder */ + if (!g_str_has_suffix (formatted_location, G_DIR_SEPARATOR_S)) + { + char *display_location; + + display_location = g_strconcat (formatted_location, G_DIR_SEPARATOR_S, NULL); + caja_entry_set_text (CAJA_ENTRY (bar->details->entry), display_location); + g_free (display_location); + } + g_free (formatted_location); } -- cgit v1.2.1