refactor: Renamed 'ctrl-*' keyboard shortcuts to 'C-*' to simplify and shrink the on-screen help
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@ impl Display for Key {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
|
||||
match *self {
|
||||
Key::Char(c) => write!(f, "<{c}>"),
|
||||
Key::Ctrl(c) => write!(f, "<ctrl-{c}>"),
|
||||
Key::Ctrl(c) => write!(f, "<C-{c}>"),
|
||||
Key::Up => write!(f, "<↑>"),
|
||||
Key::Down => write!(f, "<↓>"),
|
||||
Key::Left => write!(f, "<←>"),
|
||||
|
||||
@@ -20,7 +20,7 @@ mod tests {
|
||||
#[case(Key::BackTab, "shift-tab")]
|
||||
#[case(Key::Delete, "del")]
|
||||
#[case(Key::Char('q'), "q")]
|
||||
#[case(Key::Ctrl('q'), "ctrl-q")]
|
||||
#[case(Key::Ctrl('q'), "C-q")]
|
||||
fn test_key_formatter(#[case] key: Key, #[case] expected_str: &str) {
|
||||
assert_str_eq!(format!("{key}"), format!("<{expected_str}>"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user