aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
authorGokul Soumya2022-06-21 16:46:50 +0000
committerGitHub2022-06-21 16:46:50 +0000
commit8b67acf130e12cf8aaa439fe19ea7b8917db300b (patch)
tree7f53afaae727a23c664347ec932fd16693359609 /helix-term/src/ui
parent8ad0b83e306ff6dfc1499d3e6d25b2fd36a096a4 (diff)
Format keys identically in statusline and command palette (#2790)
The command palette previously used + as a delimiter for denoting a single key in a key sequence, (like C+w). This was at odds with how the statusline displayed them with pending keys (like <C-w>). This patch changes the palette formatting to the statusline formatting
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/editor.rs8
1 files changed, 1 insertions, 7 deletions
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())