diff options
author | Tim Oram <dev@mitmaro.ca> | 2019-08-15 21:08:07 -0230 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-15 21:08:07 -0230 |
commit | 2f266c1fc4aed8af90455145d30f2c924f6b3525 (patch) | |
tree | 9edd34a5f24aaba9c30e75ae8b1c67ccceccf7c4 | |
parent | 4e868e77e1cc6a12fe62962de169771d4b2db409 (diff) | |
parent | 8c56a7fbe621e506b76f8db3601350e078522b28 (diff) |
Merge pull request #162 from MitMaro/tim/visual-mode-help
Add visual mode to help
-rw-r--r-- | src/help/help.rs | 4 | ||||
-rw-r--r-- | src/help/utils.rs | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/help/help.rs b/src/help/help.rs index 227f52d..bc73486 100644 --- a/src/help/help.rs +++ b/src/help/help.rs @@ -12,11 +12,11 @@ use crate::window::WindowColor; use crate::Config; pub struct Help<'h> { - normal_mode_help_lines: [(String, &'h str); 21], + normal_mode_help_lines: [(String, &'h str); 22], normal_mode_max_help_line_length: usize, return_state: State, scroll_position: ScrollPosition, - visual_mode_help_lines: [(String, &'h str); 13], + visual_mode_help_lines: [(String, &'h str); 14], visual_mode_max_help_line_length: usize, } diff --git a/src/help/utils.rs b/src/help/utils.rs index 0aa7a53..f3589ae 100644 --- a/src/help/utils.rs +++ b/src/help/utils.rs @@ -19,7 +19,7 @@ fn get_input_short_name(input: &str) -> String { } } -pub fn get_list_normal_mode_help_lines(config: &Config) -> [(String, &str); 21] { +pub fn get_list_normal_mode_help_lines(config: &Config) -> [(String, &str); 22] { [ (get_input_short_name(config.input_move_up.as_str()), "Move selection up"), ( @@ -50,6 +50,10 @@ pub fn get_list_normal_mode_help_lines(config: &Config) -> [(String, &str); 21] get_input_short_name(config.input_force_rebase.as_str()), "Immediately write interactive rebase file", ), + ( + get_input_short_name(config.input_toggle_visual_mode.as_str()), + "Enter visual mode", + ), (get_input_short_name(config.input_help.as_str()), "Show help"), ( get_input_short_name(config.input_show_commit.as_str()), @@ -102,7 +106,7 @@ pub fn get_list_normal_mode_help_lines(config: &Config) -> [(String, &str); 21] ] } -pub fn get_list_visual_mode_help_lines(config: &Config) -> [(String, &str); 13] { +pub fn get_list_visual_mode_help_lines(config: &Config) -> [(String, &str); 14] { [ (get_input_short_name(config.input_move_up.as_str()), "Move selection up"), ( @@ -150,6 +154,10 @@ pub fn get_list_visual_mode_help_lines(config: &Config) -> [(String, &str); 13] get_input_short_name(config.input_action_drop.as_str()), "Set selected commits to be dropped", ), + ( + get_input_short_name(config.input_toggle_visual_mode.as_str()), + "Exit visual mode", + ), ] } |