Skip to content

Commit

Permalink
Keymap error message simplification
Browse files Browse the repository at this point in the history
Good suggestion from Conrad!
  • Loading branch information
mgsloan committed Jan 18, 2025
1 parent ec9d0a2 commit 2a78114
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions crates/settings/src/keymap_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ impl KeymapFile {
// Accumulate errors in order to support partial load of user keymap in the presence of
// errors in context and binding parsing.
let mut errors = Vec::new();
let mut error_count = 0;
let mut missing_bindings_field = false;
let mut key_bindings = Vec::new();

for KeymapSection {
Expand All @@ -169,7 +167,6 @@ impl KeymapFile {
match KeyBindingContextPredicate::parse(context) {
Ok(context_predicate) => Some(context_predicate.into()),
Err(err) => {
error_count += bindings.as_ref().map_or(0, |bindings| bindings.len());
// Leading space is to separate from the message indicating which section
// the error occurred in.
errors.push((
Expand Down Expand Up @@ -213,7 +210,6 @@ impl KeymapFile {
key_bindings.push(key_binding);
}
Err(err) => {
error_count += 1;
write!(
section_errors,
"\n\n - In binding {}, {err}",
Expand All @@ -223,8 +219,6 @@ impl KeymapFile {
}
}
}
} else {
missing_bindings_field = true;
}

if !section_errors.is_empty() {
Expand Down

0 comments on commit 2a78114

Please sign in to comment.