mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-23 01:46:18 +04:00
Add command names to command palette (#4071)
This commit is contained in:
parent
93f26a3048
commit
576c34f84e
@ -2427,11 +2427,11 @@ fn label(&self, keymap: &Self::Data) -> Spans {
|
||||
|
||||
match self {
|
||||
MappableCommand::Typable { doc, name, .. } => match keymap.get(name as &String) {
|
||||
Some(bindings) => format!("{} ({})", doc, fmt_binding(bindings)).into(),
|
||||
Some(bindings) => format!("{} ({}) [{}]", doc, fmt_binding(bindings), name).into(),
|
||||
None => doc.as_str().into(),
|
||||
},
|
||||
MappableCommand::Static { doc, name, .. } => match keymap.get(*name) {
|
||||
Some(bindings) => format!("{} ({})", doc, fmt_binding(bindings)).into(),
|
||||
Some(bindings) => format!("{} ({}) [{}]", doc, fmt_binding(bindings), name).into(),
|
||||
None => (*doc).into(),
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user