diff options
Diffstat (limited to 'helix-term/src')
-rw-r--r-- | helix-term/src/keymap.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/keymap.rs b/helix-term/src/keymap.rs index 495fe892..c7b8e895 100644 --- a/helix-term/src/keymap.rs +++ b/helix-term/src/keymap.rs @@ -140,7 +140,7 @@ impl KeyTrieNode { } } body.sort_unstable_by_key(|(_, keys)| { - self.order.iter().position(|&k| k == keys[0]).unwrap() + self.order.iter().position(|&k| k == keys[0]).unwrap_or(0) }); let prefix = format!("{} ", self.name()); if body.iter().all(|(desc, _)| desc.starts_with(&prefix)) { |