fix(app): type to search enters text into path bar
Makes the behaviour consistent with other locations.
This commit is contained in:
parent
66733b7fda
commit
a17946e21b
1 changed files with 6 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue