Skip to content

Commit

Permalink
Add 'End' hotkey
Browse files Browse the repository at this point in the history
Jump to the end of the script and walk backwards, useful in particular if the script is failing
  • Loading branch information
Quantumplation committed Oct 25, 2024
1 parent 3269007 commit 30fbf8d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions gastronomy-cli/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ impl<'a> App<'a> {
KeyCode::Char('q') => {
self.exit = true;
}
KeyCode::Char('e') | KeyCode::Char('E') => {

Check warning on line 70 in gastronomy-cli/src/app.rs

View workflow job for this annotation

GitHub Actions / cargo fmt

Diff in /home/runner/work/gastronomy/gastronomy/gastronomy-cli/src/app.rs
if key_event.modifiers.contains(event::KeyModifiers::SHIFT) {
if self.view_source {
self.cursor = self.source_token_indices.iter().last().copied().unwrap_or(self.frames.len() - 1);
} else {
self.cursor = self.frames.len() - 1;
}
}
}
KeyCode::Char('N') | KeyCode::Char('n') | KeyCode::Right => {
if self.view_source {
self.cursor = self
Expand Down

0 comments on commit 30fbf8d

Please sign in to comment.