Fix focus on back

pull/649/head
Arijit Basu 10 months ago
parent 313c61db96
commit ad50342260
No known key found for this signature in database
GPG Key ID: 0F8EF5258DC38077

@ -1042,11 +1042,10 @@ impl App {
} }
fn back(self) -> Result<Self> { fn back(self) -> Result<Self> {
if let Some(p) = PathBuf::from(self.pwd.clone()) let pwd = self.pwd.clone();
.parent() if let Some(p) = PathBuf::from(&pwd).parent().and_then(|p| p.to_str()) {
.and_then(|p| p.to_str())
{
self.change_directory(p, true) self.change_directory(p, true)
.and_then(|a| a.focus_path(&pwd, false))
} else { } else {
Ok(self) Ok(self)
} }

Loading…
Cancel
Save