fix(app): type to search enters text into path bar

Makes the behaviour consistent with other locations.
This commit is contained in:
Cheong Lau 2025-11-26 14:15:18 +10:00 committed by Jacob Kauffmann
parent 66733b7fda
commit a17946e21b

View file

@ -3004,7 +3004,12 @@ impl Application for App {
.as_ref()
.map_or_else(|| &tab.location, |x| &x.location);
// Try to add text to end of location
if let Some(path) = location.path_opt() {
if let Location::Network(uri, ..) = location {
let mut uri_string = uri.clone();
uri_string.push_str(&text);
tab.edit_location =
Some(location.with_uri(uri_string).into());
} else if let Some(path) = location.path_opt() {
let mut path_string =
path.to_string_lossy().into_owned();
path_string.push_str(&text);