rename new key

This commit is contained in:
Stephan Dilly 2021-03-13 20:36:48 +01:00
parent 39442ba6c2
commit 52bf018515
4 changed files with 6 additions and 5 deletions

View File

@ -49,8 +49,9 @@
status_stage_all: ( code: Char('a'), modifiers: ( bits: 0,),),
status_reset_item: ( code: Char('U'), modifiers: ( bits: 1,),),
status_reset_lines: ( code: Char('u'), modifiers: ( bits: 0,),),
status_ignore_file: ( code: Char('i'), modifiers: ( bits: 0,),),
diff_reset_lines: ( code: Char('u'), modifiers: ( bits: 0,),),
diff_stage_lines: ( code: Char('s'), modifiers: ( bits: 0,),),
stashing_save: ( code: Char('w'), modifiers: ( bits: 0,),),

View File

@ -788,7 +788,7 @@ impl Component for DiffComponent {
{
self.stage_lines();
Ok(true)
} else if e == self.key_config.status_reset_lines
} else if e == self.key_config.diff_reset_lines
&& !self.is_immutable
&& !self.is_stage()
{

View File

@ -49,9 +49,9 @@ pub struct KeyConfig {
pub edit_file: KeyEvent,
pub status_stage_all: KeyEvent,
pub status_reset_item: KeyEvent,
pub status_reset_lines: KeyEvent,
pub status_ignore_file: KeyEvent,
pub diff_stage_lines: KeyEvent,
pub diff_reset_lines: KeyEvent,
pub stashing_save: KeyEvent,
pub stashing_toggle_untracked: KeyEvent,
pub stashing_toggle_index: KeyEvent,
@ -103,7 +103,7 @@ impl Default for KeyConfig {
edit_file: KeyEvent { code: KeyCode::Char('e'), modifiers: KeyModifiers::empty()},
status_stage_all: KeyEvent { code: KeyCode::Char('a'), modifiers: KeyModifiers::empty()},
status_reset_item: KeyEvent { code: KeyCode::Char('D'), modifiers: KeyModifiers::SHIFT},
status_reset_lines: KeyEvent { code: KeyCode::Char('d'), modifiers: KeyModifiers::empty()},
diff_reset_lines: KeyEvent { code: KeyCode::Char('d'), modifiers: KeyModifiers::empty()},
status_ignore_file: KeyEvent { code: KeyCode::Char('i'), modifiers: KeyModifiers::empty()},
diff_stage_lines: KeyEvent { code: KeyCode::Char('s'), modifiers: KeyModifiers::empty()},
stashing_save: KeyEvent { code: KeyCode::Char('s'), modifiers: KeyModifiers::empty()},

View File

@ -416,7 +416,7 @@ pub mod commands {
CommandText::new(
format!(
"Reset lines [{}]",
key_config.get_hint(key_config.status_reset_lines),
key_config.get_hint(key_config.diff_reset_lines),
),
"resets selected lines",
CMD_GROUP_DIFF,