diff options
author | qkzk <qu3nt1n@gmail.com> | 2022-11-21 22:16:38 +0100 |
---|---|---|
committer | qkzk <qu3nt1n@gmail.com> | 2022-11-21 22:16:38 +0100 |
commit | 26ad51757a97b53c7ca12451a8dc53adcd13b6a8 (patch) | |
tree | 26a4f202872b105a42180a19eb7496fbf6c43e6b /src/actioner.rs | |
parent | 873de332ae49c47b0de244b7ca648137136b9c82 (diff) |
print path on quit
Diffstat (limited to 'src/actioner.rs')
-rw-r--r-- | src/actioner.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/actioner.rs b/src/actioner.rs index 0c0a33c..2cf1cf7 100644 --- a/src/actioner.rs +++ b/src/actioner.rs @@ -71,6 +71,8 @@ impl Actioner { Event::Key(Key::Ctrl('q')) => self.escape(status), Event::Key(Key::Delete) => self.delete(status), Event::Key(Key::Insert) => self.insert(status), + Event::Key(Key::Alt('q')) => self.alt_q(status), + Event::Key(Key::Char('Q')) => self.shift_q(status), Event::Key(Key::Char(c)) => self.char(status, c), Event::Key(Key::Home) => self.home(status), Event::Key(Key::End) => self.end(status), @@ -359,6 +361,17 @@ impl Actioner { status.selected().event_decompress() } + fn shift_q(&self, status: &mut Status) -> FmResult<()> { + status.selected().event_quit(); + Ok(()) + } + + fn alt_q(&self, status: &mut Status) -> FmResult<()> { + status.print_path_on_quit = true; + status.selected().event_quit(); + Ok(()) + } + /// Match read key to a relevent event, depending on keybindings. /// Keybindings are read from `Config`. fn char(&self, status: &mut Status, c: char) -> FmResult<()> { |