This commit is contained in:
sxyazi 2023-10-05 21:30:31 +08:00
parent a02086ab00
commit 313bee78b8
No known key found for this signature in database
2 changed files with 15 additions and 17 deletions

View file

@ -42,8 +42,7 @@ impl App {
}
fn dispatch_quit(&mut self, no_cwd_file: bool) {
if !no_cwd_file {
if let Some(p) = &BOOT.cwd_file {
if let Some(p) = BOOT.cwd_file.as_ref().filter(|_| !no_cwd_file) {
let cwd = self.cx.manager.cwd().as_os_str();
#[cfg(target_os = "windows")]
@ -57,7 +56,6 @@ impl App {
}
}
}
}
fn dispatch_key(&mut self, key: KeyEvent) {
let key = Key::from(key);

View file

@ -3,7 +3,7 @@
keymap = [
{ on = [ "<Esc>" ], exec = "escape", desc = "Exit visual mode, clear selected, or cancel search" },
{ on = [ "q" ], exec = "quit", desc = "Exit the process" },
{ on = [ "Q" ], exec = "quit --no-cwd-file", desc = "Exit the process without writing the current directory to cwd-file" },
{ on = [ "Q" ], exec = "quit --no-cwd-file", desc = "Exit the process without writing cwd-file" },
{ on = [ "<C-q>" ], exec = "close", desc = "Close the current tab, or quit if it is last tab" },
{ on = [ "<C-z>" ], exec = "suspend", desc = "Suspend the process" },