summaryrefslogtreecommitdiff
path: root/helix-term/src/ui/prompt.rs
diff options
context:
space:
mode:
authorNathan Vegdahl2021-07-01 18:57:12 +0000
committerNathan Vegdahl2021-07-02 02:06:52 +0000
commitefa3389b6aa4e07982e1e902b0173d1daa4a301e (patch)
treeea0d826cf4f191422b56ee9a5e9b7dad650af296 /helix-term/src/ui/prompt.rs
parent702a0491db0fef8ee15cd6fcff3138812da2c2aa (diff)
Fix unused variable, parameter, and `mut` warnings in helix-term.
Diffstat (limited to 'helix-term/src/ui/prompt.rs')
-rw-r--r--helix-term/src/ui/prompt.rs34
1 files changed, 17 insertions, 17 deletions
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs
index f7c3c685..a4cb26f7 100644
--- a/helix-term/src/ui/prompt.rs
+++ b/helix-term/src/ui/prompt.rs
@@ -397,6 +397,22 @@ impl Component for Prompt {
return close_fn;
}
KeyEvent {
+ code: KeyCode::Left,
+ modifiers: KeyModifiers::ALT,
+ }
+ | KeyEvent {
+ code: KeyCode::Char('b'),
+ modifiers: KeyModifiers::ALT,
+ } => self.move_cursor(Movement::BackwardWord(1)),
+ KeyEvent {
+ code: KeyCode::Right,
+ modifiers: KeyModifiers::ALT,
+ }
+ | KeyEvent {
+ code: KeyCode::Char('f'),
+ modifiers: KeyModifiers::ALT,
+ } => self.move_cursor(Movement::ForwardWord(1)),
+ KeyEvent {
code: KeyCode::Char('f'),
modifiers: KeyModifiers::CONTROL,
}
@@ -429,22 +445,6 @@ impl Component for Prompt {
modifiers: KeyModifiers::CONTROL,
} => self.move_start(),
KeyEvent {
- code: KeyCode::Left,
- modifiers: KeyModifiers::ALT,
- }
- | KeyEvent {
- code: KeyCode::Char('b'),
- modifiers: KeyModifiers::ALT,
- } => self.move_cursor(Movement::BackwardWord(1)),
- KeyEvent {
- code: KeyCode::Right,
- modifiers: KeyModifiers::ALT,
- }
- | KeyEvent {
- code: KeyCode::Char('f'),
- modifiers: KeyModifiers::ALT,
- } => self.move_cursor(Movement::ForwardWord(1)),
- KeyEvent {
code: KeyCode::Char('w'),
modifiers: KeyModifiers::CONTROL,
} => self.delete_word_backwards(),
@@ -492,7 +492,7 @@ impl Component for Prompt {
self.render_prompt(area, surface, cx)
}
- fn cursor(&self, area: Rect, editor: &Editor) -> (Option<Position>, CursorKind) {
+ fn cursor(&self, area: Rect, _editor: &Editor) -> (Option<Position>, CursorKind) {
let line = area.height as usize - 1;
(
Some(Position::new(