diff options
Diffstat (limited to 'helix-term')
-rw-r--r-- | helix-term/src/commands.rs | 5 | ||||
-rw-r--r-- | helix-term/src/ui/editor.rs | 8 |
2 files changed, 3 insertions, 10 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index d7937ff5..d4fa34e0 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -2237,9 +2237,8 @@ pub fn command_palette(cx: &mut Context) { .iter() .map(|bind| { bind.iter() - .map(|key| key.to_string()) - .collect::<Vec<String>>() - .join("+") + .map(|key| key.key_sequence_format()) + .collect::<String>() }) .collect::<Vec<String>>() .join(", ") diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index ec25ce94..dc6362c6 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -13,7 +13,6 @@ use helix_core::{ }, movement::Direction, syntax::{self, HighlightEvent}, - unicode::segmentation::UnicodeSegmentation, unicode::width::UnicodeWidthStr, LineEnding, Position, Range, Selection, Transaction, }; @@ -1391,12 +1390,7 @@ impl Component for EditorView { disp.push_str(&count.to_string()) } for key in self.keymaps.pending() { - let s = key.to_string(); - if s.graphemes(true).count() > 1 { - disp.push_str(&format!("<{}>", s)); - } else { - disp.push_str(&s); - } + disp.push_str(&key.key_sequence_format()); } if let Some(pseudo_pending) = &cx.editor.pseudo_pending { disp.push_str(pseudo_pending.as_str()) |