summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2026-05-18 22:01:49 -0400
committerVictor Kareh <[email protected]>2026-05-18 22:02:51 -0400
commitf19fff94dd1f4a554fc2f960b498814b2e6b9915 (patch)
tree1fb784a62e87d39b0cd6fdced6237e9df415b98a
parent5382d8fcdf08ac2c833858370ac0176158e37ffe (diff)
downloadcaja-trailing-slash-location-entry.tar.bz2
caja-trailing-slash-location-entry.tar.xz
location-bar: add trailing slash to displayed location pathtrailing-slash-location-entry
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
-rw-r--r--src/caja-location-bar.c11
1 files changed, 11 insertions, 0 deletions
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);
}