mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
a02086ab00
commit
313bee78b8
2 changed files with 15 additions and 17 deletions
|
|
@ -42,8 +42,7 @@ impl App {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn dispatch_quit(&mut self, no_cwd_file: bool) {
|
fn dispatch_quit(&mut self, no_cwd_file: bool) {
|
||||||
if !no_cwd_file {
|
if let Some(p) = BOOT.cwd_file.as_ref().filter(|_| !no_cwd_file) {
|
||||||
if let Some(p) = &BOOT.cwd_file {
|
|
||||||
let cwd = self.cx.manager.cwd().as_os_str();
|
let cwd = self.cx.manager.cwd().as_os_str();
|
||||||
|
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
|
|
@ -57,7 +56,6 @@ impl App {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fn dispatch_key(&mut self, key: KeyEvent) {
|
fn dispatch_key(&mut self, key: KeyEvent) {
|
||||||
let key = Key::from(key);
|
let key = Key::from(key);
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
keymap = [
|
keymap = [
|
||||||
{ on = [ "<Esc>" ], exec = "escape", desc = "Exit visual mode, clear selected, or cancel search" },
|
{ 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", 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-q>" ], exec = "close", desc = "Close the current tab, or quit if it is last tab" },
|
||||||
{ on = [ "<C-z>" ], exec = "suspend", desc = "Suspend the process" },
|
{ on = [ "<C-z>" ], exec = "suspend", desc = "Suspend the process" },
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue