From 27aee705e061c45b5fc90a251b6343de8c385c88 Mon Sep 17 00:00:00 2001 From: Antoni Stevent Date: Thu, 3 Jun 2021 15:52:50 +0200 Subject: [PATCH] use correct _extend methods, also remove unnecessary casts --- helix-term/src/keymap.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/helix-term/src/keymap.rs b/helix-term/src/keymap.rs index b7011c92..07012208 100644 --- a/helix-term/src/keymap.rs +++ b/helix-term/src/keymap.rs @@ -131,7 +131,7 @@ pub fn default() -> Keymaps { KeyEvent { code: KeyCode::Left, modifiers: KeyModifiers::NONE - } => commands::move_char_left as Command, + } => commands::move_char_left, KeyEvent { code: KeyCode::Down, modifiers: KeyModifiers::NONE @@ -145,7 +145,6 @@ pub fn default() -> Keymaps { modifiers: KeyModifiers::NONE } => commands::move_char_right, - key!('t') => commands::find_till_char, key!('f') => commands::find_next_char, key!('T') => commands::till_prev_char, @@ -290,19 +289,19 @@ pub fn default() -> Keymaps { KeyEvent { code: KeyCode::Left, modifiers: KeyModifiers::NONE - } => commands::move_char_left as Command, + } => commands::extend_char_left, KeyEvent { code: KeyCode::Down, modifiers: KeyModifiers::NONE - } => commands::move_line_down, + } => commands::extend_line_down, KeyEvent { code: KeyCode::Up, modifiers: KeyModifiers::NONE - } => commands::move_line_up, + } => commands::extend_line_up, KeyEvent { code: KeyCode::Right, modifiers: KeyModifiers::NONE - } => commands::move_char_right, + } => commands::extend_char_right, key!('w') => commands::extend_next_word_start, key!('b') => commands::extend_prev_word_start,