diff options
author | Jeff Zhao <jeff.no.zhao@gmail.com> | 2022-07-24 11:47:45 -0400 |
---|---|---|
committer | Jeff Zhao <jeff.no.zhao@gmail.com> | 2022-07-24 11:47:45 -0400 |
commit | 7cb3e8be67621191a43d530a5a0a4e49baec26e0 (patch) | |
tree | 445a5073bf0ea01452542b5f7fd053fdb640522f /src/config | |
parent | f39c918bb7e454d622a06d25096f68e19d3fc915 (diff) |
add more to error message
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/keymap/keymapping.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/config/keymap/keymapping.rs b/src/config/keymap/keymapping.rs index 5b8ba94..cc30f04 100644 --- a/src/config/keymap/keymapping.rs +++ b/src/config/keymap/keymapping.rs @@ -8,7 +8,7 @@ use termion::event::Event; use crate::config::{parse_to_config_file, TomlConfigFile}; use crate::error::JoshutoResult; -use crate::key_command::{Command, CommandKeybind}; +use crate::key_command::{AppCommand, Command, CommandKeybind}; use crate::traits::ToString; use crate::util::keyparse::str_to_event; @@ -79,6 +79,7 @@ fn vec_to_map(vec: &[CommandKeymap]) -> HashMap<Event, CommandKeybind> { continue; } + let command_str = command.command(); let result = insert_keycommand(&mut hashmap, command, &events); match result { Ok(_) => {} @@ -86,7 +87,7 @@ fn vec_to_map(vec: &[CommandKeymap]) -> HashMap<Event, CommandKeybind> { KeymapError::Conflict => { let events_str: Vec<String> = events.iter().map(|e| e.to_string()).collect(); - eprintln!("Error: Ambiguous Keymapping: Multiple commands mapped to key sequence {:?}", events_str); + eprintln!("Error: Ambiguous Keymapping: Multiple commands mapped to key sequence {:?} {}", events_str, command_str); } }, } |