mirror of
https://github.com/sayanarijit/xplr.git
synced 2024-09-11 11:05:39 +03:00
Fix cd
on first focus
Fix issue where running `xplr /path/to/file` doesn't `cd` into the parent directory.
This commit is contained in:
parent
debe98298d
commit
2c7ec47253
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1630,7 +1630,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "xplr"
|
||||
version = "0.5.11"
|
||||
version = "0.5.12"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "xplr"
|
||||
version = "0.5.11" # Update config.yml, config.rs and default.nix
|
||||
version = "0.5.12" # Update config.yml, config.rs and default.nix
|
||||
authors = ["Arijit Basu <sayanarijit@gmail.com>"]
|
||||
edition = "2018"
|
||||
description = "A hackable, minimal, fast TUI file explorer"
|
||||
|
10
src/app.rs
10
src/app.rs
@ -1451,13 +1451,12 @@ impl App {
|
||||
explorer_config.sorters = sorters.clone();
|
||||
};
|
||||
|
||||
let mut history = History::default();
|
||||
history = history.push(pwd.to_string_lossy().to_string());
|
||||
let pwd = pwd.to_string_lossy().to_string();
|
||||
|
||||
let mut app = Self {
|
||||
version: Config::default().version().clone(),
|
||||
config: config.clone(),
|
||||
pwd: pwd.to_string_lossy().to_string(),
|
||||
pwd: pwd.clone(),
|
||||
directory_buffers: Default::default(),
|
||||
selection: Default::default(),
|
||||
msg_out: Default::default(),
|
||||
@ -1468,8 +1467,9 @@ impl App {
|
||||
pipe: Pipe::from_session_path(&session_path)?,
|
||||
explorer_config,
|
||||
logs: Default::default(),
|
||||
history,
|
||||
};
|
||||
history: Default::default(),
|
||||
}
|
||||
.change_directory(&pwd)?;
|
||||
|
||||
if let Some(notif) = config.upgrade_notification()? {
|
||||
let notif = format!(
|
||||
|
Loading…
Reference in New Issue
Block a user